How i can take the value only inside the double quotes with preg_split function
from this example string
$String = '["number","1","2470A K18-901","PEDAL ASSY, GEAR CHANGE","1","PCS","56500.00","0","56500","action"]'
into like this :
Array
(
[0] => number
[1] => 1
[2] => 2470A K18-901
[3] => PEDAL ASSY, GEAR CHANGE
[4] => 1
[5] => PCS
[6] => 56500.00
[7] => 0
[8] => 56500
[9] => action
)
or with another function to achieve that
If you want to convert the string into array use json_decode:
Output:
Array ( [0] => number [1] => 1 [2] => 2470A K18-901 [3] => PEDAL ASSY, GEAR CHANGE [4] => 1 [5] => PCS [6] => 56500.00 [7] => 0 [8] => 56500 [9] => action )