title: Why is the PHP function "implode" returning the string "array"?
body: <p>I am calling the following function:</p>
  
  <pre><code>function buildInStmt($array)
  {
      if (is_array($array)) {
          $in = implode(',', $array);
      } else $in = "'" . $array . "'";
      var_dump("in=" . $in); 
      var_dump("$array=" . $array); 
      return $in;
  }
  
  ...
  
      if (!isset($_REQUEST["form-type"]) || empty($_REQUEST["form-type"])) {
          throw new Exception('You must select a form type.');       
      }
      $forms = buildInStmt(array($_REQUEST["form-type"]));
  </code></pre>
  
  <p>The var_dumps from the function are returning:</p>
  
  <p>string 'in=Array' (length=8)</p>
  
  <p>string 'Array=Array' (length=11)</p>
  
  <p>string 'in=Array' (length=8)</p>
  
  <p>string 'Array=Array' (length=11)</p>
  
  <p>string 'in=1' (length=4)</p>
  
  <p>string 'Array=Array' (length=11)</p>
  
  <p>The var_dump(array($_REQUEST["form-type"])); from the call returns:</p>
  
  <p>array (size=1)
    0 => 
      array (size=2)
        0 => string '4' (length=1)
        1 => string '7' (length=1)</p>
  
  <p>Why isn't implode returning a comma delimited string?</p>
  
  <p>Iff you elect to downvote this question, please explain the reason so I can learn from my mistakes.</p>