Hi Brad,
Again many thanks for your reply.
I am sent an XML file and one of the elements is a time as a string but if the time is less than 10:00 the leading zero is not present, so I want to add it before writing it to a table.
The code I have come up with works but is there a better way of doing it.
$RemarksWithTimeTemp = "Departed 9:27";
list($_SESSION['remark'], $_SESSION['time']) =
preg_split('#(?<=[a-z]) (?=\d)#i', $RemarksWithTimeTemp);
$RemarksWithTime = str_pad($_SESSION['time'], 5, "0", STR_PAD_LEFT);