Re: Re: can a session be used in a query?

From: Date: Thu, 08 Jan 2009 02:28:57 +0000
Subject: Re: Re: can a session be used in a query?
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.general 
Request: Send a blank email to php-general+get-285633@lists.php.net to get a copy of this message
On Wed, Jan 07, 2009 at 08:29:42PM -0500, Frank Stanovcak wrote: > because you so nicely didn't make fun of me...that much :) > I keep it in it's own file and just use it as in include to probe where I need to. > > ------code follows------ > > <?php > function breakarray($passed){ > echo '<table > border="1"><tr><th>key</th><th>value</th></tr>'; > foreach($passed as $tkey=>$tvalue){ > echo '<tr><td>[' , $tkey , ']</td><td>'; > if(is_array($tvalue)){ > breakarray($tvalue); > }else{ > echo '"' , $tvalue , '"</td></tr>'; > }; > }; > echo '</table>'; > }; > > echo '<table border=1><tr> <th>variable</th> > <th>value</th> </tr>'; > foreach(get_defined_vars() as $key => $value){ > echo '<tr><td>$',$key ,'</td><td>'; > if(is_array($value) and $key != 'GLOBALS'){ > if(sizeof($value) > 0){ > breakarray($value); > echo '</td></tr>'; > }else{ > echo 'EMPTY </td></tr>'; > }; > }else{ > echo '"' , $value , '"</td></tr>'; > }; > }; > echo '</table>'; > ?> Nicely done. Paul -- Paul M. Foster

« previous php.general (#285633) next »