note 48001 deleted from function.gd-info by danbrown
| From: | danbrown@php.net | Date: | Fri, 05 Oct 2012 14:42:58 +0000 |
| Subject: | note 48001 deleted from function.gd-info by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-191146@lists.php.net to get a copy of this message | ||
Note Submitter: phpnet at furp dot com
----
I updated the function below to include the GD Version info and any other string fields. The
function only showed the bool values before.
// Retrieve information about the currently installed GD library
function describeGDdyn() {
echo "\n<ul><li>GD support: ";
if(function_exists("gd_info")){
echo "<font color=\"#00ff00\">yes</font>";
$info = gd_info();
$keys = array_keys($info);
for($i=0; $i<count($keys); $i++) {
if(is_bool($info[$keys[$i]])) echo "</li>\n<li>" . $keys[$i] .": "
. yesNo($info[$keys[$i]]);
else echo "</li>\n<li>" . $keys[$i] .": " . $info[$keys[$i]];
}
} else { echo "<font color=\"#ff0000\">no</font>"; }
echo "</li></ul>";
}
function yesNo($bool){
if($bool) return "<font color=\"#00ff00\"> yes</font>";
else return "<font color=\"#ff0000\"> no</font>";
}