This is a discussion on Quickie (I guess...) - What does =& do? within the PHP Language forums, part of the PHP Programming Forums category; Trying to learn php, and came across =& as in $form =& $HTTP_POST_VARS; I can't find any reference to =&...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Glutinous wrote:
> Trying to learn php, and came across > > =& > > as in > > $form =& $HTTP_POST_VARS; > > I can't find any reference to =&, with no success in searching for a > definition (as though it's _so_ obvious it doesn't need explanation). > > Thanks! > It sets $form to be another refernce to $HTTP_POST_VARS. Thus changing the contents of one affects the other. Without the ampersand $form becomes a copy of $HTTP_POST_VARS. |
|
|||
|
Glutinous wrote:
> Trying to learn php, and came across > I can't find any reference to =&, with no success in searching for a > definition (as though it's _so_ obvious it doesn't need explanation). it's a reference same as $form = &$HTTP_POST_VARS; -- --- --- --- --- --- --- --- jack@croatiabiz.com |
|
|||
|
On Mon, 27 Oct 2003 10:06:55 +0000, Kevin Thorpe <kevin@pricetrak.com>
wrote: >Glutinous wrote: >> Trying to learn php, and came across >> >> =& >> >> as in >> >> $form =& $HTTP_POST_VARS; >> >> I can't find any reference to =&, with no success in searching for a >> definition (as though it's _so_ obvious it doesn't need explanation). >> >> Thanks! >> >It sets $form to be another refernce to $HTTP_POST_VARS. Thus changing >the contents of one affects the other. Without the ampersand $form >becomes a copy of $HTTP_POST_VARS. Thank you so much! Very helpful... So whatever happens to the one, happens to the other also (in a manner of speaking). As in ($input and $output being arbitary names): <?php $input =& $output; echo '$input and $output are unassigned.<br>This is $input:'." "."$input<br>"; echo 'This is $output:'." "."$output<br><br>"; $input = "Dogs"; echo '$input is now set to "Dogs".<br>This is $input:'." "."$input<br>"; echo 'This is $output:'." "."$output<br><br>"; $output = "Cats"; echo '$output is now set to "Cats".<br>This is $input:'." "."$input<br>"; echo 'This is $output:'." "."$output<br>"; ?> ? |
|
|||
|
On Mon, 27 Oct 2003 11:09:37 +0100, "k-caj" <jack@iskrica.com> wrote:
>Glutinous wrote: >> Trying to learn php, and came across >> I can't find any reference to =&, with no success in searching for a >> definition (as though it's _so_ obvious it doesn't need explanation). > >it's a reference > >same as > >$form = &$HTTP_POST_VARS; Thank you. Your 'same as &$' enabled me to look up more info. I appreciate your help! |
|
|||
|
Glutinous wrote:
> > Thank you. Your 'same as &$' enabled me to look up more info. I > appreciate your help! Slightly off topic, but I've had trouble in the past looking up non-text functions and operators (<<<, &, @, etc.). It seems Google likes to ignore them, even when quoted. Does anyone know a good method/place to look these up? Thanks, Shawn -- Shawn Wilson shawn@glassgiant.com http://www.glassgiant.com |
|
|||
|
On Mon, 27 Oct 2003 10:39:48 -0400, Shawn Wilson
<shawn@glassgiant.com> wrote: >Glutinous wrote: >> >> Thank you. Your 'same as &$' enabled me to look up more info. I >> appreciate your help! > >Slightly off topic, but I've had trouble in the past looking up non-text >functions and operators (<<<, &, @, etc.). It seems Google likes to ignore >them, even when quoted. Does anyone know a good method/place to look these up? > >Thanks, >Shawn Well, there's here... :-) I even found searching the pdf-format php manual wasn't much help with my query, and I didn't have any success with searching for lists of functions and operators... |
|
|||
|
Shawn Wilson wrote:
> Slightly off topic, but I've had trouble in the past looking up non-text > functions and operators (<<<, &, @, etc.). It seems Google likes to ignore > them, even when quoted. news:d6a0a71c.0201210351.671b1a4c@posting.google.c om Mostly, nonalphanumerics aren't taken literally. But Google at least treats ampersands literally. The hash character is an odd one though. -- Jock |
|
|||
|
"John Dunlop" <john+usenet@johndunlop.info> schrieb im Newsbeitrag
news:MPG.1a0789008961c1a3989793@news.freeserve.net ... > Shawn Wilson wrote: > > > Slightly off topic, but I've had trouble in the past looking up non-text > > functions and operators (<<<, &, @, etc.). It seems Google likes to > > ignore > > them, even when quoted. > > news:d6a0a71c.0201210351.671b1a4c@posting.google.c om do you mean this? http://groups.google.com/groups?hl=e...ing.google.com Does anybody know a good search engine for strings like 'en/(*)'? Google will search for 'en *' instead of 'en/(*)'. > > Mostly, nonalphanumerics aren't taken literally. But Google at > least treats ampersands literally. The hash character is an odd > one though. > > -- > Jock bye, Markus |
|
|||
|
John Dunlop wrote:
> > Shawn Wilson wrote: > > > Slightly off topic, but I've had trouble in the past looking up non-text > > functions and operators (<<<, &, @, etc.). It seems Google likes to ignore > > them, even when quoted. > > news:d6a0a71c.0201210351.671b1a4c@posting.google.c om > > Mostly, nonalphanumerics aren't taken literally. But Google at > least treats ampersands literally. The hash character is an odd > one though. > > -- > Jock Thanks, that'll help in the future. Shawn -- Shawn Wilson shawn@glassgiant.com http://www.glassgiant.com |