In this latest entry on his blog, Richard Miller suggests that PHP needs a "while-else statement".
I think PHP ought to have a while-else statement. There is, of course, a while statement and an if-else statement, but a while() else statement would be perfect for returning a bunch of rows from a MySQL database.
There's a sample query that he gives that loops through the results from a SQL query to see if any of them match.