can you return the name of a variable?

Discussion in 'PHP' started by falcondriver, Jul 25, 2007.

  1. #1
    he there,

    not a big deal, but i wonder if its somehow possible to return the name of a variable in php? so when i have $mystuffinhere it should simply return "mystuffinhere" :)
    just have my own "print_r()" function i use during testing to see what im working with, and it would be cool if i could also print out the name of the variable instead of just "array: ....", because it can be a bit confusing if i print out 5 arrays on the same page.
     
    falcondriver, Jul 25, 2007 IP
  2. wmtips

    wmtips Well-Known Member

    Messages:
    601
    Likes Received:
    70
    Best Answers:
    1
    Trophy Points:
    150