note 129654 added to control-structures.for
| From: | lucian.voiculescu@plentysystems.com | Date: | Mon, 15 Jul 2024 13:17:03 +0000 |
| Subject: | note 129654 added to control-structures.for | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-221426@lists.php.net to get a copy of this message | ||
There is a issue with the for loop. If you loop from 'z' to 'z' is not working
like looping from 'a to 'a' or 'b' to 'b'
$letter = 'z';
$rangeValues = [];
for ($value = $letter; $value <= $letter; $value++) {
rangeValues[] = $value;
}
It creates 65 entries.
If you change $letter = 'b' it create 1 entry.
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.5.137 (proxied: 82.77.85.174)
----
Manual Page -- https://php.net/manual/en/control-structures.for.php
Edit -- https://main.php.net/note/edit/129654
Del: integrated -- https://main.php.net/note/delete/129654/integrated
Del: useless -- https://main.php.net/note/delete/129654/useless
Del: bad code -- https://main.php.net/note/delete/129654/bad+code
Del: spam -- https://main.php.net/note/delete/129654/spam
Del: non-english -- https://main.php.net/note/delete/129654/non-english
Del: in docs -- https://main.php.net/note/delete/129654/in+docs
Del: other reasons-- https://main.php.net/note/delete/129654
Reject -- https://main.php.net/note/reject/129654
Search -- https://main.php.net/manage/user-notes.php