note 112369 added to sockets.constants
| From: | gvgvgvijayan at gmail dot com | Date: | Fri, 07 Jun 2013 14:15:17 +0000 |
| Subject: | note 112369 added to sockets.constants | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-195100@lists.php.net to get a copy of this message | ||
$a = get_defined_constants(TRUE);
foreach ($a as $k => $v) {
printf('%-25s <br/>', $k);
foreach ($v as $k => $v) {
printf('  --->%-25s %d<br/>', $k,
$v);
}
}
this may look duplicate for previous anonymous post but that code snippet only return 1 for
constants value
1-->first called the get_defined_constants by passing argument true to categorize the data
2-->then using foreach iterate over index of the array
3-->here printf is used to print title of the category
4-->then it move on to interrior array and display the list of contants available in each
category along with its value
----
Server IP: 59.162.86.123
Probable Submitter: 115.254.45.193
----
Manual Page -- http://php.net/manual/en/sockets.constants.php
Edit -- https://master.php.net/note/edit/112369
Del: integrated -- https://master.php.net/note/delete/112369/integrated
Del: useless -- https://master.php.net/note/delete/112369/useless
Del: bad code -- https://master.php.net/note/delete/112369/bad+code
Del: spam -- https://master.php.net/note/delete/112369/spam
Del: non-english -- https://master.php.net/note/delete/112369/non-english
Del: in docs -- https://master.php.net/note/delete/112369/in+docs
Del: other reasons-- https://master.php.net/note/delete/112369
Reject -- https://master.php.net/note/reject/112369
Search -- https://master.php.net/manage/user-notes.php