title: PHP error : Array to string conversion
body: <p>I have a PHP file named with Set of HTML codes, this code is to show several ID of location to be selected for the next process (Form is GET). </p>
  
  <pre><code>$sqloc = mysql_query("SELECT loc_id FROM location");
  while ($row = mysql_fetch_array($sqloc)){
  
  echo "&lt;tr&gt;&lt;td&gt;
      &lt;label&gt;&lt;input type=\"checkbox\" name=\"chk_loc[]\" value=". $row['loc_id'] ." /&gt;
  &lt;/td&gt;&lt;td&gt;" . $row['loc_id'] . "&lt;/td&gt;&lt;/tr&gt;&lt;/label&gt;"; }
  </code></pre>
  
  <p>Then in other PHP file i use this code to select data based on selected ID using checkbox before.</p>
  
  <pre><code>$cbarray = array();
  if (isset($_GET['submit_location'])) {
    $cbarray = $_GET['chk_loc']; }
  
  for ($i=0; $i&lt;count($cbarray); $i++) {
    $sqlcb = mysql_query("SELECT * FROM location WHERE loc_id = '$cbarray'");
        while($ccb= mysql_fetch_row($sqlcb)) {
                  print_r($ccb); }
  }
  </code></pre>
  
  <p>But when i run it, it appear the notice :</p>
  
  <blockquote>
    <p>Array to string conversion in .... on line 62</p>
  </blockquote>
  
  <p>On line 62 which is on ($sqlcb = mysql_query) part. I already use var_dump to check the array, and it print the array like this :</p>
  
  <pre><code>array(4) { [0]=&gt; string(5) "LO001" [1]=&gt; string(5) "LO003" [2]=&gt; string(5) "LO004" [3]=&gt; string(5) "LO005" } 
  </code></pre>
  
  <p>Is there anyway to solve this problem? thank you.</p>