Canman2005 Posted May 27, 2008 Share Posted May 27, 2008 Hi all Wondering if anyone can help. I have the following array code $name_array = array ('steve', 'jon', 'george', 'admin'); if (in_array($input, $name_array)) { return true; } else { return false; } and I want to run a SQL QUERY for the array data using something like $sql = "SELECT * FROM `members`"; $show = @mysql_query($sql,$connection) or die(mysql_error()); while ($row = mysql_fetch_array($show)) { } which would replace the 'steve', 'jon', 'george', 'admin' part of the array with data from the SQL database. Can anyone help? Been on this for 6 hours and im not managing to crack it. Any help would be ace Thanks in advance Dave 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.