!in_array use in PHP - conditional statments

hugheseagle

New Member
I want to see how I can use !in_array. I have this code, but it doesn't work:\[code\]while ($row = mysql_fetch_assoc($result)) { if (!in_array($row['item'], $output)) { $output[] = $row; } }\[/code\]Yes, I knowI am using older mysql and the code is not very "safe". Just want to know about to check if an item is in an array or not. IF it is not, I want it to store. If it is, I want the loop to skip...
 
Top