This is a PHP question and should really be asked on the PHP list.

But a suggestion.  Tried using field names instead of number?  ie.
$myrow["catid"];

I'd have to read up the PHP manual to find out for sure but I'm sure you can
do that just as well as I can.

----- Original Message -----
From: "Keith Spiller" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, February 27, 2001 10:14
Subject: array awry


This associative array embedded within a function and declared as a global
at the start of the function, is meant to be a multidimensional array, but
with every loop of the while ($myrow = mysql_fetch_row($result)) statement,
it's previous values are replaced by the new ones.  Any ideas on how I can
fix this?

          If ($Selection == "3")
          {
          $tabledata[catid]    = $myrow[0];
          $tabledata[category] = "$myrow[1]";
          $tabledata[under]    = $myrow[2];
          $tabledata[corder]   = $myrow[3];
          $tabledata[active]   = $myrow[4];
          }

Keith
aka Larentium



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to