note 72194 added to function.preg-match-all
| From: | dev at cheechtech dot com | Date: | Sun, 07 Jan 2007 09:33:19 +0000 |
| Subject: | note 72194 added to function.preg-match-all | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-121373@lists.php.net to get a copy of this message | ||
befitting the module example above
function parsePHPConfig() {
ob_start();
phpinfo(INFO_CONFIGURATION);
$s = ob_get_contents();
ob_end_clean();
$a = $mtc = array();
if (preg_match_all('/<tr><td class="e">(.*?)<\/td><td
class="v">(.*?)<\/td><td
class="v">(.*?)<\/td><\/tr>/',$s,$mtc,PREG_SET_ORDER)) {
foreach($mtc as $v){
if($v[2] == '<i>no value</i>') continue;
$a[$v[1]] = $v[2];
}
}
return $a;
}
----
Server IP: 66.207.199.35
Probable Submitter: 24.226.238.52
----
Manual Page -- http://www.php.net/manual/en/function.preg-match-all.php
Edit -- https://master.php.net/note/edit/72194
Del: integrated -- https://master.php.net/note/delete/72194/integrated
Del: useless -- https://master.php.net/note/delete/72194/useless
Del: bad code -- https://master.php.net/note/delete/72194/bad+code
Del: spam -- https://master.php.net/note/delete/72194/spam
Del: non-english -- https://master.php.net/note/delete/72194/non-english
Del: in docs -- https://master.php.net/note/delete/72194/in+docs
Del: other reasons-- https://master.php.net/note/delete/72194
Reject -- https://master.php.net/note/reject/72194
Search -- https://master.php.net/manage/user-notes.php