You are here: reference assignment « PHP Programming Language « IT news, forums, messages
reference assignment

Posted by Jon Slaughter on 06/02/07 00:52

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?

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

 

Navigation:

[Reply to this 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

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