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 Link to comment https://forums.phpfreaks.com/topic/107407-solved-db-array/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.