Use explode() on the pipe character to create array2, then use array_shift to pull the first element out of that array, which you can then parse with preg_match() to get the comma-delimited section within the square brackets, which you then explode() on the commas to populate array1.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Bookmarks