Re: Semi-Newbie question about arrays
| From: | Curt Zirzow | Date: | Sun, 17 Aug 2003 22:57:18 +0000 |
| Subject: | Re: Semi-Newbie question about arrays | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-159866@lists.php.net to get a copy of this message | ||
* Thus wrote Gremillion (big4head@pacbell.net):
> $recNum = $lastPart;
> $ord++;
> $updateEntries[$ord] = $recNum;
> }
> $updateEntries[$ord][] = array($first, $value);
> //populate nested arrays of each entry
> etc......
>
> throws:
> "PHP Fatal error: [] operator not supported for strings"
>
> How do I make $updateEntries[$ord] evaluate as an array?
You'll have to add a little more structure to the array. Mabey
something like:
$updateEntries[$ord]['recNum'] = $recNum;
$updateEntries[$ord]['values'] = array($first, $value);
or
$updateEntries[$ord][$recNum] = array($first, $value);
Curt
--
"I used to think I was indecisive, but now I'm not so sure."