Display an array in a readable/hierarchical format

后端 未结 18 1202
北荒
北荒 2020-12-02 04:53

Here is the code for pulling the data for my array



        
18条回答
  •  温柔的废话
    2020-12-02 05:42

    I think that var_export(), the forgotten brother of var_dump() has the best output - it's more compact:

    echo "
    ";
    var_export($menue);
    echo "
    ";

    By the way: it's not allway necessary to use

    . var_dump() and var_export() are already formatted when you take a look in the source code of your webpage.

提交回复
热议问题