Re: Modifying arrays

From: Date: Mon, 15 Jan 2001 15:01:17 +0000
Subject: Re: Modifying arrays
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-34631@lists.php.net to get a copy of this message
$array = array('foo','bar','hello'); for($i = 0 ; $i < sizeof($array) ; ++$i) { if($i == 1) { $array[$i] = 'not_bar'; } } Hope this helps! Also check out: http://www.php.net/manual/en/ref.array.php --Joe On Mon, Jan 15, 2001 at 01:19:56PM +0200, Catalin Borcea wrote: > How do I modify the value of the current element of an array? > > -- Catalin Borcea -- > \\\|/// > \\ - - // > ( @ @ ) > -----oOOO----(_)----OOOo---- > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net -- Joe Stump, PHP Hacker joestump98@yahoo.com http://www.miester.org/

« previous php.general (#34631) next »