So I have medical licenses that are kept as a string in the db. I need a way to show a license letter(s) (prefix) and number separately.
The array of prefixes is pre-defined:
$license_letters = array('20A', 'A', 'C', 'CNM', 'G', 'NP', 'PA');
And licenses look like 20A345000, C11006, G678999, PA200200, and so on. So I need to be able to get '20A' and '345000' or 'C' and '11006' for any license.
Searching by the first digit will not work because one of the possible prefixes is 20A. I'm pretty sure there must be a simple solution, but I can't think of it. Would appretiate any help.