我見過一些在線漂亮打印模塊的代碼。任何人都知道將一個多維數組格式化爲可讀顯示的方法嗎?如何格式化(漂亮打印)多維數組以進行調試?
實施例,翻譯這樣:
陣列(83){[0] =>陣列(2){ [ 「名稱」] =>串(11) 「CE2選項」 [「型「] => string(5)」title「} [1] => array(1){[」type「] => string(4)」open「 } [2] => array(5){[ 「name」] => string(8)「Template」[「desc」] => string(638)「test description」 [「id」] => string(9)「my_theme」 [「type」 ] => string(14)「selectTemplate」 [「options」] => array(13){
進入這個......
array(83) {
[0]=> array(2) { ["name"]=> string(11) "My Options" ["type"]=> string(5) "title" }
[1]=> array(1) { ["type"]=> string(4) "open" }
[2]=> array(5) {
["name"]=> string(8) "Template"
["desc"]=> string(638) "Test description"
["id"]=> string(9) "my_theme"
["type"]=> string(14) "selectTemplate"
["options"]=> array(13) {
[0]=> string(10) "test"
重複的問題http://stackoverflow.com/questions/1168175/is-there-a-pretty-print-for-php – giorgio79 2012-12-19 07:34:11