pedrobcabral Posted March 20, 2007 Share Posted March 20, 2007 I have wasted sometime on this and i cant figure out the solution, here it goes: <?php $menu1 = "icecreams"; $menu2 = "meet"; $random = $menu .rand(1,2); The random variable outputs "1" or "2" instead of icecreams or meet. Can anyone help me? Thanks. Link to comment https://forums.phpfreaks.com/topic/43560-simple-vars-doubt-i-guess/ Share on other sites More sharing options...
per1os Posted March 20, 2007 Share Posted March 20, 2007 <?php $menu[1] = "icecreams"; $menu[2] = "meet"; $random = $menu[rand(1,2)]; Link to comment https://forums.phpfreaks.com/topic/43560-simple-vars-doubt-i-guess/#findComment-211542 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.