RE: [PHP] Re: how can I add a variable to this sample

From: Date: Fri, 04 Jan 2002 00:10:13 +0000
Subject: RE: [PHP] Re: how can I add a variable to this sample
Groups: php.general 
Request: Send a blank email to php-general+get-79398@lists.php.net to get a copy of this message
> So far nothing seems to work which leads me to believe > there's something else wrong. > > Here's what I've tried > > $service_type_insert = $x['926service_type']; //works fine > when I hard code > a value in and returns proper value > > $service_type_insert = $x[$$keyservice_type]; //returns empty > even though I know a value is there Work from this one and try: $keytoinsert = $$keyservice_type; $service_type_insert = $x[$keytoinsert]; ... I don't think you can reference variables as $$something inside [] braces. Jason

« previous php.general (#79398) next »