zoukankan      html  css  js  c++  java
  • php--->php打印格式化

    php打印格式化

    • 当我们PHP调试的时候,用var_dump 或 print_r打印json数据或array数组时,html页面没有换行显示,看到的内容一大堆,不好定位。输出前添加html的pre标签,便可以自动格式化换行显示。
    //比如打印数组 : print_r($arr);
    Array ( [0] => Array ( [volume] => id100343 [weight] => 4 ) [1] => Array ( [volume] => id100212 [weight] => 1 ) [2] => Array ( [volume] => id104104 [weight] => 10 ) )
    
    //添加<pre> 后,看起来就清晰很多
    print_r("<pre>");
    print_r($arr);
    //输出:
    Array
    (
        [0] => Array
            (
                [volume] => id100343
                [weight] => 4
            )
    
        [1] => Array
            (
                [volume] => id100212
                [weight] => 1
            )
    
        [2] => Array
            (
                [volume] => id104104
                [weight] => 10
            )
    
    )
    
  • 相关阅读:
    SQL SEREVR IO
    INTEL
    windows performance
    The DiskSpd Storage Performance Tool
    machine Learning
    NOSQL
    X64 Deep Dive
    Debugging and performance,ETW
    Disk Performance
    WCF transport-and-message-security
  • 原文地址:https://www.cnblogs.com/frankltf/p/8571724.html
Copyright © 2011-2022 走看看