🔒 Closed Help

Status
Not open for further replies.

SUNRAI

Eternal Poster
[CODE title="php"]<?php

$colors = array("red", "green", "white");

echo "The memory of that scene for me is like a frame of film forever frozen at that moment: the" . &colors [0] . "carpet, the" . &colors [1] . "lawn, the" . &colors [2] . "house, the leaden sky. The new president and his first lady. - Richard M. Nixon";

?>[/CODE]
Code:
 
PHP:
<?php

$colors = array("red", "green", "white");

echo("The memory of that scene for me is like a frame of film forever frozen at that moment: the ".$colors[0]." carpet, the ".$colors[1]." lawn, the ".$colors[2]." house, the leaden sky. The new president and his first lady. - Richard M. Nixon");

?>
 
if you are using double quote

no need na putulin mo tas add ng .

like
$var = "variable";
echo "i am ".$var;

pwede mo gamitin yun direcly

echo "i am $var";

or

echo "i am ${var}";
 
Status
Not open for further replies.

About this Thread

  • 2
    Replies
  • 315
    Views
  • 3
    Participants
Last reply from:
PHC_Jayvee

Online now

Members online
1,028
Guests online
1,766
Total visitors
2,794

Forum statistics

Threads
2,275,219
Posts
28,961,566
Members
1,232,670
Latest member
mike2112
Back
Top