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 Quote 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 ??? Quote Link to comment https://forums.phpfreaks.com/topic/135936-click-numebr-increment/#findComment-711355 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.