Re: adding values to array from query

From: Date: Mon, 07 Apr 2003 15:20:20 +0000
Subject: Re: adding values to array from query
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-142702@lists.php.net to get a copy of this message
Thats the one! Thanks. - Charles On Monday, April 7, 2003, at 06:50 AM, Don Read wrote:
On 07-Apr-2003 Charles Kline wrote:
hi all, if have a query like so (using pear db): $result = $db->getAll($sql); if (DB::iserror($result)){
      die($result->getDebugInfo() . " at line " . __line__);
} How would I go about pushing a value to the front (position 0) of that array? I have a value $attributes['id'] that I want to stick on the front of $result.
array_unshift(); Regards, --
Don Read                                       dread@texas.net
-- It's always darkest before the dawn. So if you are going to    steal the neighbor's newspaper, that's the time to do it.


« previous php.general (#142702) next »