title: displaying array difference in php when arrays coming from mysql_fetch_array
body: <p>I'm designing a php script which shows the available buses of a certain travel agency on a given date. This is the php code snippet.    </p>
  
  <pre><code>$query1 = mysql_query("SELECT bus_id FROM schedule WHERE travel_agency_id = '".$travel_agency_id."' AND scheduleddate ='".$busDate."'");
  $query2 = mysql_query("SELECT bus_id FROM pc WHERE travel_agency_id = '".$travel_agency_id."' ");
  
  $array1 = array(@mysql_fetch_array($query1));
  $array2 = array(@mysql_fetch_array($query2));
  $diff = array_diff($array2, $array1);
  print_r ($diff);
  </code></pre>
  
  <p>I thought that the above query will print the <code>"bus_id"</code>s of the travel agency id <code>"$travel_agency_id"</code> on the given date <code>"$busDate"</code>. However an error occurred as following.</p>
  
  <blockquote>
    <p>Notice: Array to string conversion in.......... Array ( [0] => )</p>
  </blockquote>
  
  <p>Could anyone explain why this error occurred..? How can I use <code>"echo"</code> to display the array of available buses (id) ?</p>