Q:

Write a script which will display the following string

0

$color = array('white', 'green', 'red', 'blue', 'black');
Write a script which will display the following string
"The memory of that scene for me is like a frame of film forever frozen at that moment: the red carpet, the green lawn, the white house, the leaden sky. The new president and his first lady. - Richard M. Nixon"
and the words 'red', 'green' and 'white' will come from $color.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

<?php
$color = array('white', 'green', 'red', 'blue', 'black');
echo "The memory of that scene for me is like a frame of film forever frozen at that moment: the $color[2] carpet, the $color[1] lawn, the $color[0] house, the leaden sky. The new president and his first lady. - Richard M. Nixon"."\n";
?>

Sample Output:

The memory of that scene for me is like a frame of film fore
ver frozen at that moment: the red carpet, the green lawn, t
he white house, the leaden sky. The new president and his fi
rst lady. - Richard M. Nixon

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now