Page 1 of 1

Syntax Question

Posted: Wed Apr 11, 2012 6:35 am
by rkittleberger
Alright guys, a bit of a noob here, and this question might have a simple answer (it also might be in the wrong place, not totally familiar with the forums yet), but here goes...

In PHP what exactly does the "->" operator do? Here's an example...

Code: Select all

<?php
$datagrid -> init( );
?>
Thanks in advance!

Re: Syntax Question

Posted: Wed Apr 11, 2012 7:26 am
by social_experiment
By using -> you can access the methods and properties of an object. $datagrid in this instance is an object and init() is a method (function) inside the class.

Re: Syntax Question

Posted: Wed Apr 11, 2012 8:13 am
by rkittleberger
Got it. Thanks for the reply!