Strings can be considered as arrays, with the keys being the symbols:
$id = 1922312; // PHP converts 01922312 => 1 because of that leading zero. Either make it a string or remove the zero. $id_str = strval($id); for ($i = 0; $i < count($id_str); $i++) { print($id_str[$i]); }
This should print the original number. Now, to do things with it, treat it like a regular array:
$id_str[count($id_str) - 1] = 'x'; $id_str[count($id_str) - 2] = 'y'; $id_str[count($id_str) - 3] = 'z';
Hope this helps!
Blender
source share