我想修复php数组

I would like to fix php array.

Dear my array as the following :

$stmyarr=Array ( [0] => [0]=>aaa,[1]=>ddd,[2]=>bbb,[3]=>ccc)

I want to remove [0] =>

So result when display is

Array ([0]=>aaa,[1]=>ddd,[2]=>bbb,[3]=>ccc)

How to do that ?

simple, just reassign the array name to [0]

// after your original $stmyarr
$stmyarr = array(0 => array( 0 => 'aaa', 1 => 'ddd', 2 => 'bbb', 3 => 'ccc'));
$stmyarr = $stmyarr[0];
print_r($stmyarr);

result is:

Array
(
    [0] => aaa
    [1] => ddd
    [2] => bbb
    [3] => ccc
)
$stmyarr=array ('0' => array('0'=>'a','1'=>'b','2'=>'c'));
$array = array_values($stmyarr[0]);
print_r($stmyarr);

it would be just

$stmyarr = $stmyarr[0];

Reading the array manual will certainly be helpful in future.

$stmyarr=array ( '0' => array('0'=>'aaa','1'=>'ddd','2'=>'bbb','3'=>'ccc'));
$stmyarr=current(array_values($stmyarr));