title: How to use oci_new_collection in php?
body: <p>I am trying to call a stored procedure using php 5, my question is how would I use the 'oci_new_collection' function properly?  I couldn't find any examples on the php site.  For one of the variables that needs to be passed to the stored procedure it uses this custom user defined table type...</p>
  
  <pre><code>SQL&gt; desc parameter_table
   parameter_table TABLE OF PARAMETER_TYPE
   Name                   Null?    Type
   ---------------------- -------- ----------------------------
   NAME                            VARCHAR2(200)
   VALUE                           VARCHAR2(4000)
  </code></pre>
  
  <p>So my guess is that i need to use the oci_new_collection to use this table type.  My code is as follows...</p>
  
  <pre><code>    $conn = DBConnect::getConnection();
      $parameter_table = oci_new_collection($conn, "PARAMETER_TABLE");
      //need to do something here....
      $parameter_table-&gt;append(:name =&gt; "owner_id", :value =&gt; "3945073");
      //
  
      $curs = oci_new_cursor($conn);
      $stid = oci_parse($conn, "begin reporting.execute_report(:name, :plist, :out); end;");
      oci_bind_by_name($stid, ':name', "TRAFFIC_ANALYSIS_CALL_SUMMARY");
      oci_bind_by_name($stid, ':plist', $parameter_table);
      oci_bind_by_name($stid, ":out", $curs, -1, OCI_B_CURSOR);
      oci_execute($stid); 
  
      oci_execute($curs);  // Execute the REF CURSOR like a normal statement id
      while (($row = oci_fetch_array($curs, OCI_ASSOC+OCI_RETURN_NULLS)) != false) {
          echo $row[0] . " " . $row[1] . "&lt;br&gt;\n";
      }
  </code></pre>
  
  <p>How would I populate the name/value fields for the $parameter_table variable? </p>