<?
$me = "foo";
${$me} = "now";
print $foo;
?>

even though it can be done, i strongly reccomend that
you re-evaluate the reasons why you want to do this.
making var-of-a-var is usually not the easiest/best
way to accomplish something....

why not use assoc. arrays??
  $stuff['foo'] = explode(...);


> -----Original Message-----
> From: King, Justin [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 17, 2001 1:26 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] dynamically naming arrays
> 
> 
> I guess I'm kind of not understanding what you're trying to do.  Besides
> dynamically create an array.
> 
> I'd think what you're trying would work though
> 
> --Justin King, School District of Superior Web Coordinator
> (www.superior.k12.wi.us)
> 
> -----Original Message-----
> From: "Matthew Luchak" <[EMAIL PROTECTED]> 
> Sent: Thursday, May 17, 2001 10:27 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] dynamically naming arrays
> 
> 
> any hints on dynamically naming arrays?
> 
> ie:
> 
> $stuff= explode ("!", $contents);
> 
> //$stuff[3] is "foo"
> 
> $stuff[3]=explode("&",$stuff[4]);
> 
> print_r($foo);
> 
> ____________________________ 
> Matthew Luchak 
> Webmaster
> Kaydara Inc. 
> [EMAIL PROTECTED]
> 
> 
> 
> 
> --
> 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]
> 
> 
> -- 
> 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]
> 

-- 
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]

Reply via email to