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

  • Music:

Variable names

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

Two questions
1)
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

2)
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.
Subscribe
  • Post a new comment

    Error

    default userpic

    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.
  • 44 comments