$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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]