title: How do you suggest unique usernames to user in PHP?
body: <p>Let's say the username someone wants is taken, then I want the system to suggest a list of available usernames, say 5 suggestions.</p>
  
  <p>Now, I can generate several usernames based on permutations and combinations of data I already have, like their name, birthday, e.t.c. But how do I make sure those generated usernames are available? I mean, if for each generated username, I have to query the database to check availability, in the worst case scenario this might become something like an infinite loop.</p>
  
  <p>Any ideas? </p>