I would like to generate an alphanumeric employee id in PHP e.g. EP0001
Any ideas?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
We are going to need more than this to help you but this is what I would do.
Assuming
EPis the start of every alphanumeric employee id thenUPDATE
Thanks to
TrefexIf you use MySQL, you could store the employee ID in a field and set the ZEROFILL attribute. That way you don’t have to deal with the zeroes in PHP