Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2006
    Posts
    10

    Angry Unanswered: How to get a variable name as a string in PHP?

    How to get a variable name as a string in PHP?

    for example, var_name ($my_var) will give ‘my_var’.
    Last edited by montyauto; 10-11-06 at 05:35.
    Monty Auto

    Fast.ProBuilderPLUS.com
    One of The Fastest Growing Online Business Available Today.

  2. #2
    Join Date
    Oct 2006
    Posts
    1
    RTFM

    http://us2.php.net/manual/en/languag...bles.php#49997

    I do something similar to check if a variable is empty then look for it's GET/POST variable using the variable's name. the function illustrated in the php manual returns the name of variable i.e. vname($my_var) returns "my_var"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •