I want to split a string using a given character as a separator eg.
somedatasomemoredataevenmoredata
Is there a built in function to do this and how would I typically iterate through several tokens, saving each off into a variable then getting the next?
^^^ What he said… If you’re using several unique tokens in a single string, however, you may want to look into preg_split. (Though it doesn’t look like you’re doing that per your example)