The script was working great before PHP 4.2.x and not after that. So, I
looked through the code and came upon this variable, $$var. I have no
idea what the purpose of the double $ is for a variable. Anyone know?
--clip--
$var = v.$counter._high_indiv;
Variable variable. Read the docs.
$v = 'foo';
$foo = 'bar';
echo $$v;
Regards,
Andrey
P.S.
Sometimes {} are used : ${$v}
Scott Fletcher [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
The script was working great before PHP 4.2.x and not after that. So, I
looked through the
Interesting! Look like the 2nd $ is decomissioned and is reserve for
something in the future or something. Just like the _ is when it come
with $_POST as an example. That would explain why it doesn't work with PHP
4.2.x up.
Andrey Hristov [EMAIL PROTECTED] wrote in message
/language.variables.predefined.php
Regards
Joakim Andersson
-Original Message-
From: Scott Fletcher [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 16, 2002 3:54 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Purpose of $$var ?
The script was working great before PHP 4.2.x and not after
that. So
: Tuesday, July 16, 2002 9:54 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Purpose of $$var ?
The script was working great before PHP 4.2.x and not after that. So, I
looked through the code and came upon this variable, $$var. I have no
idea what the purpose of the double $ is for a variable. Anyone
ROTECTED]]
Sent: Tuesday, July 16, 2002 3:54 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Purpose of $$var ?
The script was working great before PHP 4.2.x and not after
that. So, I
looked through the code and came upon this variable, $$var.
I have no
idea what the purpose of th
What docs at php.net? under variable, predefine variable or what?
Andrey Hristov [EMAIL PROTECTED] wrote in message
002601c22cd0$b1995170$1601a8c0@nik">news:002601c22cd0$b1995170$1601a8c0@nik...
Variable variable. Read the docs.
$v = 'foo';
$foo = 'bar';
echo $$v;
Regards,
Andrey
P.S.
Alright! Found the problem! Faulty script written that come before this
script where $$var come into play. At least, it wasn't me, it was the other
programmer's error. :-)
Scott Fletcher [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Interesting! Look like
8 matches
Mail list logo