In php ,I have a array like this:
[
[0] =>
[
[0] => 255
[1] => 216
[2] => 255
]
[1] =>
[
[0] => 25
[1] => 54
[2] => 25455
]
]
And now I want array like that:
[
[0] => 255
[1] => 216
[2] => 255
]
[
[0] => 25
[1] => 54
[2] => 25455
]
any good ideas? in php language!
Check this,
<?php
$arr = [
0 =>
[
0 => 255,
1 => 216,
2 => 255,
],
1 =>
[
0 => 25,
1 => 54,
2 => 25455,
]
];
echo json_encode($arr);
Output
[[255,216,255],[25,54,25455]]
Here is working demo,
json_encode — Returns the JSON representation of a value