I have a number of strings, that contain the bracket literals:
0 => string '[139432,97]' (length=18)
1 => string '[139440,99]' (length=18)
I need to create string arrays of [139432,97]
and [139440,99]
.
I've tried using json_decode()
, but while it works, it creates arrays as float
or int
using the above data, however I want them as strings
.
array (size=2)
0 => float 139432
1 => int 97
array (size=2)
0 => float 139440
1 => int 97