Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How PHP compares complex variables 1

Status
Not open for further replies.

Itshim

Programmer
Apr 6, 2004
277
US
By complex variables, I mean comparing a user variable with a PHP variable like $_FILES.

I need to determine if a variable sent to an object method is the entire $_FILES var or if the user has sent some portion of the $_FILES var.

I was thinking of using something simple like:
Code:
if ($upload_input == $_FILES) {
    //do something
}

But I wanted to verify that this will actually determine if the two are equal in every way. Some testing seems to indicate that this is the case, but I was just wondering if anyone happens to know for a fact.

TIA,
Itshim
 
print_r($_FILES) will show you exactly whats been used.

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
True, true, but I need to determine this dynamcally. I am creating a fairly robust upload package, and I would like to allow the caller to be able to send any ligitamate portion of the $_FILES var. Such as, simply sending $_FILES, or $_FILES['audio'].
 
Sorry spelling bugs me:
dynamcally => dynamically
ligitamate => legitimate
 
You have no idea how many times I've been on that page to get the syntax of the ternary operator correct, and I never glanced up 2" to see the exact answer I was looking for. :(

Thank you sleipnir for the link, and kudos to PHP for having excellent documentation.

Itshim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top