Parse error: syntax error, unexpected T_ECHO
this is a part of my code and i m getting this error somewhere in this part
Parse error: syntax error, unexpected T_ECHO
$data = mysql_query("SELECT * FROM $title") or die(mysql_error());
while($info = mysql_fetch_array( $data ))
{
?>
<div id="username"><? php echo $info['name'] ?></div>
<div id="statement"> <? php echo $info['comment'] ?></div>
<hr/>
<?php } ?>
please somebody help me , i could not solve this !!!!!!
aaloo
Junior Poster in Training
76 posts since Oct 2011
Reputation Points: 22
Solved Threads: 0
try
<div id="username"><?php echo $info['name']; ?></div>
<div id="statement"> <?php echo $info['comment']; ?></div>
diafol
Rhod Gilbert Fan (ardav)
7,792 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080
Thanks sir ! i really did a silly mistake
i have a one more question if you could answer me
i am making a list in html and i want to give different styles to alternate elements in the list.how it is possible ??
aaloo
Junior Poster in Training
76 posts since Oct 2011
Reputation Points: 22
Solved Threads: 0
diafol
Rhod Gilbert Fan (ardav)
7,792 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080
Thanks again , you all are genius !!
aaloo
Junior Poster in Training
76 posts since Oct 2011
Reputation Points: 22
Solved Threads: 0