Can anyone help me find the errors in this piece of code. When I try running it it says there is an unexpected ';' on line 10 but I'm not sure where this would be. Thanks `
$lines = array (
0=>'Once upon a time',
1=>'There lived a small green frog that lived',
2=>'on a lilypad in a pond. ',
3=>'One day a princess came along and kissed it.'
);
$max = count($lines) ;
$out = null ;
while ($i = 0; $i<$max; $i++) {
$opentag = '' ;
$closetag = '' ;
if ($i = 0) {
$opentag = '<h1>' ;
$closetag = '</h1>' ;
}
if ($i = 1 ) {
$opentag = '<p>' ;
}
if ($i = ($max-1) ) {
$closetag = '</p>' ;
}
$out = $opentag . $lines[$i] $closetag ;
}
echo $out ;
?>`
while
loop??? – Bhuvan Rikka 웃 Jan 29 '13 at 4:15