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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.