I have a string like this: "eg1 - eg2 - eg3".
I would like to turn that string into an array. So, the array would have 3 keys and I could then loop through those keys.
Could anyone provide some information relating to how I could accomplish this task using PHP?
If there is always a whitespace between the “-“
Better split with regex