Does this small piece of code seem ok? |
For generating a unique code you will need to check if it already exists, and if it does regenerate.
If you don't want the loop you could create this as an iterative method. PHP Code: public function generate_code() { |
Welcome Guest, Not a member yet? Register Sign In |