How to print the array values in php? [closed]

2019-09-20 14:45发布

How i can replace the array values in php

 Array ([0] => Array ([ss] => k))

into

 array("0" => array ("ss" => "k"));

1条回答
手持菜刀,她持情操
2楼-- · 2019-09-20 15:01

You have to write you own function to output the format you like.

While the nearest solution with build-in function is var_export.

$array = array(array('ss' => 'k'));
var_export($array);

Output:

array (
  0 =>
  array (
    'ss' => 'k',
  ),
)
查看更多
登录 后发表回答