note 38946 added to function.ini-get-all

From: Date: Tue, 13 Jan 2004 03:26:17 +0000
Subject: note 38946 added to function.ini-get-all
Groups: php.notes 
Request: Send a blank email to php-notes+get-63389@lists.php.net to get a copy of this message
I tried the comment suggested by chevick_1776 at yahoo dot com, in regards to a standardized chunk of code, but the versions of PHP I use, 4.3.4, and 4.3.2, as well as a beta of 5.0 didn't give any results. After playing with it for a few moments, here is a shorter and simpler block of code I put together, that works for me, and others might find of use. $ia= ini_get_all(); var_dump ($ia); echo "<table width='100%'>"; echo "<tr align='center' valign='middle'><th width='20%'><b>Key</b></th><th width='35%'><b>Global Value</b></th><th width='35%'><b>Local Value</b></th><th width='10%'><b>Access</b></th></tr>"; while(list($key, $value)= each($ia)) { echo "<tr align='middle'><td align='left'>" .$key ."</td><td align='center'>" .$ia[$key]['global_value'] ."</td><td align='center'>" .$ia[$key]['local_value'] ."</td><td align='center'>" .$ia[$key]['access'] ."</td></tr>"; } echo "</table>"; } Two things I will caution on, is one, that if you are using it inside a theme, or other restricted layout page, you might want to run it once, and then add a filter to break up some of the data, such as for the "url_rewriter.tags" key. The values are long enough to break the themes on my sites without a filter. Once I find a stable filter that works on all of the versions of PHP that I use and have access to, I will post it as well... And two, you might not need the <b></b> HTML tags, inside of the <th></th> tags as I have found are a requirement for my uses. ---- Manual Page -- http://www.php.net/manual/en/function.ini-get-all.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+38946 Delete -- http://master.php.net/manage/user-notes.php?action=delete+38946&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+38946&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#63389) next »