adzie Posted December 7, 2008 Share Posted December 7, 2008 Hello Folks, In my table I have this echo '<td><a href="javascript:myclick(0)">$number</a></td>'; I'd like it to increment for each row starting with 0 for the first row, any thoughts Link to comment https://forums.phpfreaks.com/topic/135936-click-numebr-increment/ Share on other sites More sharing options...
priti Posted December 10, 2008 Share Posted December 10, 2008 will following code will work for you echo '<td><a href="javascript:myclick(0)">$number</a></td>'; this with for($i=0;$i<4;$i++) { echo '<td><a href="javascript:myclick('.$i.')">$number</a></td>'; } you want to increment '0' or $number ??? Link to comment https://forums.phpfreaks.com/topic/135936-click-numebr-increment/#findComment-711355 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.