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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux