<?php $string = '(-6.2811957386588855, 106.70141951079609),(-6.281142416506361, 106.70432702536823),(-6.2781776962328815, 106.70438066954853),(-6.2781776962328815, 106.70136586661579)'; foreach(explode('),(',trim($string,'()')) as $single_array) { $sub_array= array(); foreach(explode(',',$single_array) as $sbs_array) { $sub_array[] = $sbs_array; } $result[] = $sub_array; } print_r ($result);
You have javascript disabled. You will not be able to edit any code.