Hello Everyone,

    I am trying to make a page that will interact with mysql.  I need to be
able to access the result of my mysql_query by using a for loop.  I made a
little function that will sortof do this, but it returns a numeric array.
Of course, I want an associative array (becauses things get screwy with a
null). Does anyone know how to make something like what I want?  Thanks a
bunch :-)

This is my current function:

function returnArray ($id) {
     $z = array (array());
     for ($i = 0; $row = mysql_fetch_array ($id); $i++) {
          for ($a = 0; $a < sizeof ($row); $a++) {
               $z[$i][$a] = $row[$a];
          }
     }
     return $z;
}


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to