dxdolar Posted August 29, 2008 Share Posted August 29, 2008 I have 2 SQL queries I run, then I assign them to arrays, I need to find and display where they interest. I thought it was easy enough to use array_intersect, but the only thing that displays is "Array", instead of the actual values. Here's the snippet $q="SELECT first set of stuff"; $r= mysqli_query ($dbc, $q); $dirty = array(); if ( mysqli_num_rows ($r) >= 1){ while ($row = mysqli_fetch_array ($r, MYSQLI_ASSOC)){ $dirty [] = $row['ring_name']; } //end while $clean = array_unique($dirty); $q2="SELECT from other stuff $r2= mysqli_query($dbc, $q2); $cat = array (); while ($c = mysqli_fetch_array ($r2, MYSQLI_ASSOC)){ $cat [] = $c['ring_name']; }//end while $result = array_intersect($clean, $cat); echo $result."<br />"; } I tried making sure that the values were being stored in $clean and $cat by displaying them, and they're in there alright, it's just after using intersect it doesn't recognize the actual values and it just says, ARRAY ARRAY ARRAY. Any help would be appreciated. Thanks! Quote Link to comment Share on other sites More sharing options...
dxdolar Posted August 29, 2008 Author Share Posted August 29, 2008 RESOLVED :/ just needed fresh eyes. 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.