LemonInflux Posted May 30, 2008 Share Posted May 30, 2008 I have this php code: <?php for($i=0;$i<30;$i+3){ echo ('<tr><td>'.$letter[$].'</td><td>'.$letter[$i+1].'</td><td>'.$letter[$i+2].'</td></tr>'); } ?> Basically, it displays: <tr><td>Value 1</td><td>Value 2</td><td>Value 3</td></tr> <tr><td>Value 4</td><td>Value 5</td><td>Value 6</td></tr> Until it reaches value 30 (Excuse any errors, it's just for example's sake). My question is, is there a way to replicate this in smarty? Thanks in advance Quote Link to comment Share on other sites More sharing options...
LemonInflux Posted May 30, 2008 Author Share Posted May 30, 2008 Too late to change it, but I spotted an error: echo ('<tr><td>'.$letter[$].'</td><td>'.$letter[$i+1].'</td><td>'.$letter[$i+2].'</td></tr>'); should be echo ('<tr><td>'.$letter[$i].'</td><td>'.$letter[$i+1].'</td><td>'.$letter[$i+2].'</td></tr>'); Quote Link to comment 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.