Reply to Re: reference assignment

Your name:

Reply:


Posted by Jerry Stuckle on 06/02/07 01:55

Jon Slaughter wrote:
> If I do something like
>
> $r = &$something;
>
> $r = array();
>
> does it refer to $something or does the reference get remove first? if
> so(which it seems it is) can I for $r always ot point to $something?
>

The reference is removed first. As in all assignments in PHP, the
current assignment replaces the previous one.n

> Essentially what I'm trying to do is simplfy the a variable name but I need
> to create it if it doesn't exist after the reference.
>
> What I have is a class that contains a variable that points to a session
> variable and I want to use that class variable throughout the class as a
> reference to the session variable but I have to create the session variable
> if it does exist in some cases which seems to be removing the reference and
> creating a new variable instead.
>
> Thanks,
> Jon
>
>


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация