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>
<?php } ?>

please somebody help me , i could not solve this !!!!!!

Member Avatar


<div id="username"><?php echo $info['name']; ?></div>
<div id="statement"> <?php echo $info['comment']; ?></div>

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 it is possible ??

$class = 'otherRow';
echo '<ul>';
while($info = mysql_fetch_array( $data )) {
if ($class == 'otherRow')
    $class = '';
    $class = 'otherRow';

echo "<li class='$class'></li>";
echo '</ul>';

Thanks again , you all are genius !!