Re: Replacement functions for array functions
| From: | Harald Houppermans | Date: | Sat, 22 Jul 2000 20:44:42 +0000 |
| Subject: | Re: Replacement functions for array functions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-7714@lists.php.net to get a copy of this message | ||
>> The array functions were added in php4.
>>
>> Does somebody have replacement functions for php3 ?
>>
>> I need to use array_push en array_unshift ?
>
>As per the documentation, array_push() is the same as doing:
>
> $arr[] = "foo";
ok thanks...
>array_unshift() is a bit tougher in PHP 3. I'd suggest doing it by
>keeping track of your indices and just inserting a value with a lower
>index.
euhm... with array_unshift je can remove the first element of an array... not insert it.