I imagine this one's been done before, but maybe not in the same way....
<?php
$result = succeed();
while (!$result){
try{
$result = succeed();
}
catch (Exception $e){
echo $e;
}
}
echo "hell yeah";
function succeed(){
$a = rand(1,2);
switch($a){
case 1:
trigger_error('fml');
break;
case 2:
return TRUE;
break;
}
}
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

