🔒 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.

Similar threads

About this Thread

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

Trending Topics

Online now

Members online
1,050
Guests online
3,390
Total visitors
4,440

Forum statistics

Threads
2,307,974
Posts
29,182,325
Members
1,192,708
Latest member
Squidrockz
Back
Top