RE: [PHP] Can it be doen with Array????
| From: | Gareth Hastings | Date: | Thu, 02 Jan 2003 22:06:42 +0000 |
| Subject: | RE: [PHP] Can it be doen with Array???? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-129999@lists.php.net to get a copy of this message | ||
Bah, I meant
$a[] = "0";
$a[] = "1";
$b = $a;
echo $b[0];
> -----Original Message-----
> From: Gareth Hastings [mailto:gareth@netgs.co.uk]
> Sent: Thursday, January 02, 2003 5:05 PM
> To: 'Scott Fletcher'; php-general@lists.php.net
> Cc: php-general@lists.php.net
> Subject: RE: [PHP] Can it be doen with Array????
>
> Yes you can simply assign arrays like
>
> $a = "0";
> $a = "1";
> $b = $a;
>
> echo $b[0];
>
> would print
>
> 0
>
>
> > -----Original Message-----
> > From: Scott Fletcher [mailto:scott@abcoa.com]
> > Sent: Thursday, January 02, 2003 5:08 PM
> > To: php-general@lists.php.net
> > Subject: [PHP] Can it be doen with Array????
> >
> > Hi!
> >
> > I know that it can be done with certain variables that can
> overwrite
> > another variable. Like ....
> >
> > $test = "123";
> > $other = "xyz";
> >
> > $test = $other;
> >
> > What about the Array? Can this be done?
> >
> > $array_test[1] = "abc";
> > $array_test[2] = "jkl";
> > $array_test[3] = "$%(";
> >
> > $other_test = $array_test;
> >
> > echo $other_test[1];
> >
> > Would the result be "abc"???? Does it work that way? I need
> > something
> > that would work with one array to a different array.
> >
> > Thanks....
> >
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php