Search Help Board

PHP Articles
PHP Help
Bulletin Board

PHP Manual (NEW!)
First Time PHP'ers
Help with programming
Sql assignment help
PHP Homework Help

C# Help
RFP Direct

 checking variables
Author:  (
Date:   02-29-04 10:52

Hi at all.

I'm searching for a solution which enables me to gather all defined variables and their value. The problem is that this solution should be flexible, so that the names are not given.

I know that it is almost impossible, but I'd be really happy if s.b. can help me. I'm looking forward to hearing from you. For further queries send a mail.

Thank you all.


 Re: checking variables
Author: fred (
Date:   03-03-04 13:04

//used to show all passed variables
$variableSets = array(
"Post:" => $HTTP_POST_VARS,
"Get:" => $HTTP_GET_VARS,
"Session:" => $HTTP_SESSION_VARS,
"Cookies:" => $HTTP_COOKIE_VARS,
"Server:" => $HTTP_SERVER_VARS,
"Environment:" => $HTTP_ENV_VARS

function printElementHtml( $value, $key ) {
echo $key . " => ";
print_r( $value );
echo "<br>";

foreach ( $variableSets as $setName => $variableSet ) {
if ( isset( $variableSet ) ) {
echo "<br><br><hr size='1'>";
echo "$setName<br>";
array_walk( $variableSet, 'printElementHtml' );

 Re: checking variables
Author:  (
Date:   03-04-04 07:22

Hi Fred!

Thank you so much - it's really awesome and you really helped me that way. Well done!

Ok, thanks to you one more time - I'd never ever found that solution.


Go to Top  |  Go to Topic  |  Threaded View  |  Search 
New Topic
 Reply To This Message
 Your Name:
 Your Email:
Email replies to this thread, to the address above.

Provided By