Fluf Posted October 11, 2007 Share Posted October 11, 2007 Hi. For example I compare two values and if those values match then script should take another value from array and then echo it.I just need do know how do skip saying the variable value when they match.Hope someone gets what i need. It's like script for learning new words in other languages and when he asks me a new words, then i don't want to see those words come around... Quote Link to comment https://forums.phpfreaks.com/topic/72816-language-script/ Share on other sites More sharing options...
thewooleymammoth Posted October 11, 2007 Share Posted October 11, 2007 im not sure exactly what you mean.... but i think this is what your trying to do? [code] <?php $name1=array("bob","joe","jack"); $name2=array2("jack","joe","bob"); while (done !=1) {$num=rand(0,2); $num1=rand(0,2); if (name1[$num] == name2[$num1]) $num2=name1[$num]+1; echo "$name1[$num2]"; ?> idk if that helps i dont really understand what your trying to do but i hope that helps? sorry if i messed up some how on it im in a hurry[/code] Quote Link to comment https://forums.phpfreaks.com/topic/72816-language-script/#findComment-367228 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.