Re: Replacement functions for array functions

From: Date: Tue, 23 Jul 2080 01:37:25 +0000
Subject: Re: Replacement functions for array functions
Groups: php.general 
Request: Send a blank email to php-general+get-7739@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_shift ?! >> > >> >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. >> > >No, array_unshift(), inserts an element. You are right... sorry.... I mean/need array_shift... in php3. :)

« previous php.general (#7739) next »