note 118703 deleted from control-structures.do.while by cmb
| From: | cmb@php.net | Date: | Sun, 04 Dec 2016 12:24:21 +0000 |
| Subject: | note 118703 deleted from control-structures.do.while by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-208211@lists.php.net to get a copy of this message | ||
Note Submitter: gried at NOSPAM dot nsys dot by
----
It might be obvious but still, for those who need to use do-while with alternative syntax you can
use while-break combination like in a code below:
<?php
do{
// ... some statements
} while ($expr);
?>
is equal to
<?php
while(1): ?>
some html code
<?php
if (! $expr) break;
endwhile;
?>