var_dump() with mail()

Discussion in 'PHP' started by Weirfire, Jul 19, 2007.

  1. #1
    I want to test out some code (an array) on a webpage but I don't want it displaying all the data on the web page.

    Is there an easy function like var_dump() which i can use with the function mail() which would display the whole $_SESSION array?
     
    Weirfire, Jul 19, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    
    $array = print_r($_SESSION, true);
    mail('you@example.com', 'Session array', $array);
    
    PHP:
     
    nico_swd, Jul 19, 2007 IP
    Weirfire likes this.
  3. Weirfire

    Weirfire Language Translation Company

    Messages:
    6,979
    Likes Received:
    365
    Best Answers:
    0
    Trophy Points:
    280
    #3
    Thanks Nico! :)
     
    Weirfire, Jul 19, 2007 IP