i have following array . i want to json_encode for this array Result like [{"dietary_options":"234"},{"dietary_options":"123"}] using array method not for loop.
Array
(
[0] => Array
(
[dietary_options] =>
)
[1] => Array
(
[dietary_options] =>
)
[2] => Array
(
[dietary_options] =>
)
[3] => Array
(
[dietary_options] =>
)
[4] => Array
(
[dietary_options] =>234
)
[5] => Array
(
[dietary_options] => 123
)
)
foror aforeach? it just takes a few lines using them