Hey,
first of sorry if this is ment to be in the newbie forum, and please move it if it needs to be there, again sorry.
okay, now for the problem. i have a freelance website, and what i want to do is alt colors between each row of project. but with the code aim entering now i get a:
Parse error: parse error, unexpected $ in /home/letemscr/public_html/radlance2/radlance/src/a_default.php on line 180
(line 180 being the last line in the php document)
here is the orginal code: (without any alt row colors)
// Projects new
ob_start();
?>
<b>New Projects</b></td>
</tr>
<tr>
<td><?
if($moderated){
print_projects2("type='Open' AND radlance_projects.moderated=1", "|$newprojectsnum", "dateposted DESC" );
}else{
print_projects2("type='Open'", "|$newprojectsnum", "dateposted DESC");
}
?>
<a href="index.php?a=projects&<?=$id?>"?>View All</a> </td>
</tr>
</table>
<p>
<?
$prn = ob_get_contents();
ob_end_clean();
//}
and this is what i have now (after my own editing for the alt colors)
// Projects new
ob_start();
?>
<b>New Projects</b></td>
</tr>
<tr>
<td><?
if($moderated){
print_projects2("type='Open' AND radlance_projects.moderated=1", "|$newprojectsnum", "dateposted DESC" );
}else{
print_projects2("type='Open'", "|$newprojectsnum", "dateposted DESC");
}
$clr=0;
$color='';
while ($row=print_projects2("fetch_array", $result)) {
if($clr%2==0)
{$color='#D3DCE5';
}
else{
$color='#FFFFFF';
}
$clr++;
?>
<a href="index.php?a=projects&<?=$id?>"?>View All</a> </td>
</tr>
</table>
<p>
<?
$prn = ob_get_contents();
ob_end_clean();
//}
any ideas?
basicaly what aim trying to dois, everytime a new project is opened if the previous line was white, this new one would be blue, then white again then blue again, and keep going.
any help is appreated.
Thank You in adavance.
Mike