Example:
E00892911 -> 892911
E012993 -> 12993
E178239 -> 178239
L00002134 -> 2134
I need to trim the first letter, which I know how to do:
Code: Select all
$my_new_id = trim($my_id, $my_id[0]);Moderator: General Moderators
Code: Select all
$my_new_id = trim($my_id, $my_id[0]);You can do that with trim as well:dimxasnewfrozen wrote: Now, I need to remove all the 0's in the beginning of $my_new_id, there's no defined amount of how many occurrences there will be. There could be none, or there could be 8.
Code: Select all
$my_new_id = ltrim($my_id, $my_id[0] . "0");