note 128754 added to function.define
| From: | axew3 dot me at you dot us | Date: | Sat, 22 Jul 2023 10:05:22 +0000 |
| Subject: | note 128754 added to function.define | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-220714@lists.php.net to get a copy of this message | ||
about this:
https://www.php.net/manual/en/function.define.php#128753
more exactly, to output a CONSTANT building his name with vars can be done like this even (for
example) into a for loop:
<?php
for($i=0;$i<5;$i++){
echo constant($avar_.$i.$anothervar);
....
?>
----
Server IP: 45.112.84.4
Probable Submitter: 45.91.159.168 (proxied: 2.37.207.169)
----
Manual Page -- https://php.net/manual/en/function.define.php
Edit -- https://main.php.net/note/edit/128754
Del: integrated -- https://main.php.net/note/delete/128754/integrated
Del: useless -- https://main.php.net/note/delete/128754/useless
Del: bad code -- https://main.php.net/note/delete/128754/bad+code
Del: spam -- https://main.php.net/note/delete/128754/spam
Del: non-english -- https://main.php.net/note/delete/128754/non-english
Del: in docs -- https://main.php.net/note/delete/128754/in+docs
Del: other reasons-- https://main.php.net/note/delete/128754
Reject -- https://main.php.net/note/reject/128754
Search -- https://main.php.net/manage/user-notes.php