Jump to content

Help with learning


hishighness

Recommended Posts

Hey everyone, I'm trying to teach myself php by reading php.net and diving in to code head first. It's going pretty well so far as I've been able to meet some useful stuff but I've kinda reached a roadblock here and was wondering if you guys can "unstuck" me.

 

For the life of me I can't figure out what this is supposed to do.

 

if($ipsclass->input['act'] == "Arcade")
{
$ipsclass->input['autocom'] = "arcade";

}

 

From the context of what the page does I deduce that it checks to see whether act = Arcade and if it is it sets $ipsclass->input['autocom'] to "arcade" but I have no clue what the $ipsclass->input part does. Is it like a function called "input" ? Is $ipsclass a variable, a function, or something else I've never heard of?

 

Any light that could be shed on this would be appreciated, because I'm lost. It looks like a powerful function which could save me a lot of typing. :D

 

Thanks for your time,

Link to comment
https://forums.phpfreaks.com/topic/157411-help-with-learning/
Share on other sites

if($ipsclass->input['act'] == "Arcade")
{
$ipsclass->input['autocom'] = "arcade";

}

 

 

$ipsclass is your object. So somewhere up above you instantiated it like so:

 

$ipsclass = new yourclass();

 

 

You access your entire class through $ipsclass....any methods or properties is accessed through this....

Link to comment
https://forums.phpfreaks.com/topic/157411-help-with-learning/#findComment-829853
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.