Jump to content

[SOLVED] help with php variables


valtido

Recommended Posts

Hi

 

i have came across a few variables which seem a little odd to me because i dont know how it works.

 

e.g.

 

$vatriable->whatever(string);

$vatriable->whatever(string)->whatever2(string2);

 

im just wondering if anyone knows anything of how the "->" is used?

or if there is any documentation about this?

 

Thank you

Link to comment
https://forums.phpfreaks.com/topic/122194-solved-help-with-php-variables/
Share on other sites

ok what that is, is object oriented programming

 

the object becomes the variable $Variable

 

to call a function within the object (e.g. SendText())

$Variable = new TextTest; (The Variable becomes the object)

$Variable->SendText($Text); now you have called the function from the object

 

What do you mean by "linked with API?"

 

API = Application Programming Interface and it is basically all the functions, etc. Just google PHP5 OOP or even take a look at the tutorial on the PHP Freaks main site (although I think it's for people with basic understanding of PHP4 OOP.

Hmm personally I haven't had any experiance with php untill this year, and oop came extremely simplistic for me.  Easier to use then typical flow control for me, But also I would suggest php.net, they have an entire web-based manual for php including flow control, oop, as well as help with fronted database functions and objects.

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.