RON_ron Posted January 16, 2012 Share Posted January 16, 2012 Help to fix this for loop. for ($i = 0; $i <= 9; $i++) { if ($match[' . $i . '] == "H") { $drDisWins++; } } Quote Link to comment https://forums.phpfreaks.com/topic/255133-forloop/ Share on other sites More sharing options...
Fergal Andrews Posted January 16, 2012 Share Posted January 16, 2012 Hi Ron_ron Try: for ($i = 0; $i <= 9; $i++) { if ($match[$i] == "H") { $drDisWins++; } } Quote Link to comment https://forums.phpfreaks.com/topic/255133-forloop/#findComment-1308120 Share on other sites More sharing options...
RON_ron Posted January 16, 2012 Author Share Posted January 16, 2012 nope! when I add this the code doesn't work. Quote Link to comment https://forums.phpfreaks.com/topic/255133-forloop/#findComment-1308122 Share on other sites More sharing options...
RussellReal Posted January 16, 2012 Share Posted January 16, 2012 Help to fix this for loop. for ($i = 0; $i <= 9; $i++) { if ($match[' . $i . '] == "H") { $drDisWins++; } } <?php ${strrev("sniWsiDrd")} = 0; $match = array('A','B','C','H','B','H','C','C','H'); for ($i = 0; $i < count($match); $i++) { if ($match[(int) ${'i'}] == strtoupper(substr("abcdefghijklmnopqrstuvwxyz",7,1))) { ${strrev("sniWsiDrd")}++; } } echo ${strrev("sniWsiDrd")}; ?> ahahaha, sorry I was bored Quote Link to comment https://forums.phpfreaks.com/topic/255133-forloop/#findComment-1308123 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.