maybe you could use eval():
eval("echo \$" . $field");
----- Original Message -----
From: "Andy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 05, 2002 2:57 AM
Subject: Seams not to be possible
> This was just an error in my explenation I ment categories.
> Meanwhile I tryed var vars, but it does not work for any reason?!?!?
> My code looks like:
> $field = $categories."";
> echo $field; // returns glacier
> echo 'var '.$$field.'<br>'; // returns bluddy nothing
> echo $categories; // returns glacier
> echo $glacier; // returns 110
> Does anybody know how to get the 110 out of the array?????
> Thanx for any help,
> "Andy" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hi there,
> > I have a tricky array question.
> > My app is passing via post a array variable called glacier. Now I am
> > checking for the content
> > of this array. Because there are more of those arrays, I am getting all
> > names out of a db.
> > How is it possible to get the value and keep the name of the array
> > e.g:
> > Array name passed by post is: $glacier
> > contains e.g. $glacier = testname
> > Array with category names coming out of db is: $category // contains
> > $category = glacier
> > echo $categories; // returns glacier
> > echo $glacier; // returns testname
> > I tryed $categories but it returns only the first letter of
> > (g)
> > Any ideas??
> > Thanx, Andy
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php