You are here: Re: Help with Javascript: naming variables using other variables « HTML « IT news, forums, messages
Re: Help with Javascript: naming variables using other variables

Posted by X l e c t r i c on 10/31/64 11:31

Leif=A0K-Brooks wrote:

"No, it's concatenation

<http://php.net/manual/en/language.operators.string.php> combined with
abuse of a PHP misfeature which turns missing constants into strings. It
works fine with my copy of PHP 4.3.10:

leif@debian:~$ php -v
PHP 4.3.10-15 (cli) (built: May 9 2005 08:54:56) Copyright (c) 1997-2004
The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
leif@debian:~/ecritters/web/html$ php
<?php
$var1 =3D "foo";
${$var1.bar} =3D "great!";
print $foobar;
// Outputs "great!"
?>
great!leif@debian:~$""

I obvoiusly did something wrong. I'll go try it again.

Thanks, Art.

 

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

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