note 91127 deleted from reserved.variables.server by danielc
| From: | danielc@php.net | Date: | Thu, 09 Jun 2011 13:11:56 +0000 |
| Subject: | note 91127 deleted from reserved.variables.server by danielc | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-180362@lists.php.net to get a copy of this message | ||
Note Submitter: Myrddin
Reason: 1
----
To extend a bit on the table posted by jeffwk. You can use this piece of code to print all $_SERVER
variables in a table with some mouse over effects to increase readability.
<?php
echo '<table style="border-collapse: collapse;">';
foreach ($_SERVER as $key => $val)
echo '<tr onMouseOver="this.style.backgroundColor=\'AAAABB\';"
onMouseOut="this.style.backgroundColor=\'transparent\';"><td
style="font-weight: bold; border-right: 2px solid
#000000;">'.$key.'</td><td style="width:
100%;">'.(is_array($val)?nl2br(print_r($val,true)):$val).'</td></tr>';
echo '</table>';
?>