I have the result of a query with several joins
, and in a row I have the concatenation of 2 groups. The line returns a string as: 1,4|a1,b4
.
What I need is to regroup ID and Value as follows: array( 1 => a1 , 4 => b4 )
, or similarly, but not wrapped using explode
and recombine the array.
I thought about using preg_replace
, but I could not get a functional rule.