The Rhythmic Devil (divineright) wrote in php,
The Rhythmic Devil

  • Music:

Variable names

I looked through the manual but I did not find a function to help me out.

Two questions
How do I print the name of a variable?
For instance I have a variable name $name

$name = "bob";

I want to print out

print "$name = bob

and have the output

$name = bob

I have an upload file form that handles multiple files. When I get the file array from $_FILES each array has the name of the upload field from the form. I want to insert that name into the database as part of the record. I am probably missing something obvious but I cant figure out how to get the name as a string.
  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.