Gary Broughton <[EMAIL PROTECTED]> wrote:
> Hi
> 
> Many thanks for your time Matt.  I tried that method amongst a few
> others, and couldn't seem to get it right.  What I have eventually come
> across is the function 'array-push' (bizarre!) to add a new array line
> for each record (after it's been initially defined).  It seems to work
> for me, and hopefully it is the correct, standard way to do such a task.
> 
>       $strCusts = array(array('id','name'));
> /* setting up empty array for cust id and name */
>       if (mysql_num_rows($resCusts) > 0) {
>               $intCusts = mysql_num_rows($resCusts);
> /* store the number of records retrieved */
>               while ($oRsCusts = mysql_fetch_array($resCusts)) {
>       
> array_push($strCusts,array($oRsCusts["id"],$oRsCusts["name"]));       /* add
> new array row */

thats to complicated just use:
$strCust[] = $osRsCusts;
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to