Hello,
when I use this syntax:
champs[0] is a string, which is the name of an HTML form variable.
class test
{
var champs;
function verif()
{
for ($i = 0; $i < count($this->champs) ; $i++)
{
global $$this->champs[$i][0];
$tmp = $this->champs[$i][0];
$this->champs[$i][1] = $$tmp;
}
}
}
Everything works properly, but when I use this :
class test
{
var champs;
function verif()
{
for ($i = 0; $i < count($this->champs) ; $i++)
{
global $$this->champs[$i][0];
$this->champs[$i][1] = $$this->champs[$i][0];
}
}
}
It doesn't work ($this->champs[$i][1] is empty).
My problem is : why is the global instruction working whereas the newt
line isn't with this formulation (I have to use a temporary variable
which I then can reference).
Thanx for any help, and apologize my poor English.
S. ROZIER
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]