?

Search Help Board

PHP FAQ
PHP Articles
PHP Help
Bulletin Board

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


C# Help

?
?Re: checking variables
Author:?fred?(---.access.uk.tiscali.com)
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 "
";
}

foreach ( $variableSets as $setName => $variableSet ) {
if ( isset( $variableSet ) ) {
echo "


";
echo "$setName
";
array_walk( $variableSet, 'printElementHtml' );
}
}
?>

?Topics Author? Date
?checking variables??new
Thomas 02-29-04 10:52?
?Re: checking variables??new
fred 03-03-04 13:04?
?Re: checking variables??new
Thomas 03-04-04 07:22?
Go to Top??|??Go to Topic??|??Flat View??|??Search?
??|??
New Topic
?Reply To This Message
?Your Name:
?Your Email:
?Subject:
Email replies to this thread, to the address above.
??wrote: > > //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 "
"; > } > > foreach ( $variableSets as $setName => $variableSet ) { > if ( isset( $variableSet ) ) { > echo "


"; > echo "$setName
"; > array_walk( $variableSet, 'printElementHtml' ); > } > } > ?> ">??

Provided By
Phorum