Re: variable and MySQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I think I understand your question.  Perhaps what you want is not a variable
variable -- but a variable (determined from the context).
Variables always vary depending on the situation as opposed to a constant
which - uhh -- stays constant.  Combine the variable and the constant in a
new variable first with concatenation.

$question_pointer = $xxx . "_name_en";

$get_question_data[$question_pointer]

Mark Cain


----- Original Message -----
From: "simon" <seth889@xxxxxxxx>
To: <php-db@xxxxxxxxxxxxx>
Sent: Monday, March 14, 2005 7:14 PM
Subject:  variable and MySQL


> Hi, I'm trying to make a script but have a problem ...
>
> How could I do this:
>
> I'd like to use   $get_question_data[xxx_name_en]
>
> where xxx would be a variable variable according to the situation where
the
> script is called... how would I do this?
>
> tried :
>
> $get_question_data[$test_name_en]
> $get_question_data[{$test}_name_en]
> ${get_question_data[$test_name_en]}
>
> but nothing works .... any help would be appreciated.
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux