Pelle Ravn Rosfeldt wrote:
Python & Perl already have this function. So why not PHP? It could be very useful in an SQL query, if it doesn't return anything.
in Python else clause is executed if while is not ended by break. So it makes sense when you searching for something:
<? $i = 1; while ($i <= 10) { echo $i++; if($i == $j) { echo "Found"; break; } } else { echo "Not found!"; } ?> It can't be easily written with if. But your case can be. -- Regards, Paul. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php