Edit report at https://bugs.php.net/bug.php?id=26411&edit=1
ID: 26411 Comment by: hawkyhawk14 at gmail dot com Reported by: php at bellytime dot com Summary: while {} else {} Status: Open Type: Feature/Change Request Package: Scripting Engine problem Operating System: * PHP Version: * Block user comment: N Private report: N New Comment: larue...@php.net no such syntax in other languages. --------------------------------- Python has it and some versions of BASIC have it aswell. Previous Comments: ------------------------------------------------------------------------ [2012-08-22 10:09:30] ni...@php.net Revert status change. ------------------------------------------------------------------------ [2012-08-22 05:56:57] larue...@php.net no such syntax in other languages. ------------------------------------------------------------------------ [2012-08-21 17:38:24] bensor987 at neuf dot fr Why don't you go a little bit further ? while ( $row = mysql_fetch_assoc( $result ) ){ } else for ( $i = 0; $i < $cpt; $i++ ) { } else if ( $dude ) { } else { } ------------------------------------------------------------------------ [2012-04-26 02:13:36] ma-martin at hotmail dot de Hey, i was also looking for some while {} else {} feature... but i think it could be difficult to implement such a function in php. Because the else{} event would start after the while{}-loop ends -> everytime after the last result! think about it! ------------------------------------------------------------------------ [2012-01-25 12:16:57] hawkyhawk14 at gmail dot com This is a great idea. I am currently needing something like this, but however got around it using flags and making the flag true in the while. It would be alot more convenient if there was an else! Please add this feature!!! ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=26411 -- Edit this bug report at https://bugs.php.net/bug.php?id=26411&edit=1