string to array
hi there i want o split this string into 2 arrays
one array has only ids
and others will have new|edit|del|view|password
thanks in advance
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.