I am using echo
inside the HTML tr
tag where I am getting an error.
Here is my code
index.php
<?php
$i=0;
while($row=mysql_fetch_array($ros))
{
if($i%2==0)
$classname="evenRow";
else
$classname="oddRow";
echo '<tr class="id" >';
echo '<tr class="'echo $classname'">';
?>
I am getting following error:
Parse error: syntax error, unexpected T_ECHO, expecting ',' or ';' in E:\xampp\htdocs\pagination\index.php on line 64
Where am I going wrong and how can I achieve my desired output?
Thanks in advance