zebaron Posted June 14, 2007 Share Posted June 14, 2007 Hi, what I would like to do is create an array of several different numbers ($num_array), and then check if a number ($num) is already stored inside that array, and return a true or false. Is there a function that does this already? I searched the docs a bit but didn't find anything. Quote Link to comment https://forums.phpfreaks.com/topic/55507-solved-determine-if-a-variable-exists-in-an-array/ Share on other sites More sharing options...
AndyB Posted June 14, 2007 Share Posted June 14, 2007 in_array() - http://ca.php.net/manual/en/function.in-array.php Quote Link to comment https://forums.phpfreaks.com/topic/55507-solved-determine-if-a-variable-exists-in-an-array/#findComment-274290 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.