Rifts Posted March 21, 2012 Share Posted March 21, 2012 nvm delete Quote Link to comment Share on other sites More sharing options...
Psycho Posted March 21, 2012 Share Posted March 21, 2012 Well, what is the content of $wtf and where is $thecount defined? in any event you should be using a foreach() loop on the array and not a for() loop. You can easily find what IS happening by adding some code to show debugging messages. Try this $number = 3; foreach($wtf as $word) { $wordCount = strlen($word); echo "Word {$word}, Count: {$wordCount}, " if($number == $wordCount) { echo "Match!<br>\n"; } else { echo "No Match!<br>\n"; } } 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.