I have a php variable which reads data from CSV file using str_getcsv() function as below:
$test = array_map('str_getcsv', file($path))
Now $test contains array as below:
Array
(
[0] => Array
(
[0] => Array
(
[0] => abc
)
[1] => Array
(
[0] => def
)
[2] => Array
(
[0] => ghi
)
[3] => Array
(
[0] => jkl
)
)
)
I would like to convert it in simple array as follows:
Array
(
[0] => abc
[1] => def
[2] => ghi
[3] => jkl
)
Can somebody help?