Drezard Posted April 7, 2007 Share Posted April 7, 2007 Heres the error: Parse error: syntax error, unexpected ')', expecting ';' in C:\Program Files\xampp\htdocs\wintersword\core\combat\combat.class.php on line 923 Heres the code... echo "</tr>"; for ($i = 0, $i < $arraysize, $i + 1) { $magic = $explodearray[$i]; Whats the problem? Thanks to everyone who has helped me so far with this. To let you know its all going towards my game (can be found at www.wintersword.com/user_register.php) Link to comment https://forums.phpfreaks.com/topic/45972-for-loop-failing/ Share on other sites More sharing options...
per1os Posted April 7, 2007 Share Posted April 7, 2007 for ($i = 0; $i < $arraysize; $i + 1) { You were acting like for was a function by using commas, user semi-colons. Basic syntax rule. Link to comment https://forums.phpfreaks.com/topic/45972-for-loop-failing/#findComment-223371 Share on other sites More sharing options...
kenrbnsn Posted April 7, 2007 Share Posted April 7, 2007 Actually, this should be written as: <?php for ($i=0;$i<$arraysize;$i++) { ?> Ken Link to comment https://forums.phpfreaks.com/topic/45972-for-loop-failing/#findComment-223382 Share on other sites More sharing options...
per1os Posted April 7, 2007 Share Posted April 7, 2007 Yea, my bad thanks for the correction ken, I was caught up on the commas. Link to comment https://forums.phpfreaks.com/topic/45972-for-loop-failing/#findComment-223387 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.