Well, depends on string format. It may be enough of explode() call or if your string is more complex - then you may need preg_match_all(). In the very rare cases, when you don't have a pre-defined number format or you don't know what is number and what is not BEFORE string parsing - you may need a full scale string parsing with some state machine analyzing string in chunk-by-chunk fashion until you are done appending found data into array.