Re: test for undefined variables & renaming variables
| From: | Steve Werby | Date: | Thu, 08 Feb 2001 05:06:08 +0000 |
| Subject: | Re: test for undefined variables & renaming variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-38675@lists.php.net to get a copy of this message | ||
"August Malson" <thearchgu@mac.com> wrote:
> Does anyone know of a way to test for undefined variables? For example, I
> I have tried isdef(), but that function does not seem to work, and I
Try is_set().
> Also, does anyone know how to rename a variable?
>
> I want to create a variable $attributes_NameOfVariable, but it does not
seem
> to work. is there a function that exists in PHP that will assist me in
this
> process?
I'm not clear what you're trying. Can you repost with a better example of
what you mean? You might be referring to variable variables, which are
documented on http://php.net/.
$age = 27;
$var = "age";
echo $$var; // prints 27
--
Steve Werby
COO
24-7 Computer Services, LLC
Tel: 804.817.2470
http://www.247computing.com/