Re: Array Brain Freeze

From: Date: Thu, 19 Mar 2009 18:01:17 +0000
Subject: Re: Array Brain Freeze
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-290304@lists.php.net to get a copy of this message
> > Hello all, > > I have the follwoing piece of code: > > //reference a stored procedure > $procedure = "Execute Procedure informix.arrest_char($part_id)"; > > //run the stored procedure > $char_query = ifx_query($procedure, $connect_id); > > //get the result of the stored procedure > $char_result = ifx_fetch_row($char_query); > > //print out the returned values. > print_r($char_result); > > This all works just fine and I have values returned. What I am trying to > do is assign one of the array items to a variable. > > In the past I have done so like this: > > $stat_1 = $char_result['stat_1']; > > But for some odd reason $stat_1 doesn't contain anything. > > Am I going crazy or am I doing something wrong? > > Thanks, > > Dan > Please disregard...the brain freeze went away and i spotted the problem. The array value name had a [ in it. So when referencing it to assignmy variable I wasn't including the additional bracket. :) Dan

« previous php.general (#290304) next »