Welcome to the Treehouse Community
Looking to learn something new?
Konrad Pilch2,435 Points
PHP -> ?
What does means query($query) and as well as the arrow -> and i know that the LINE means that its happening in the current page, so if we have include, the file or whatever , will happend in the current page not in include files .
$results = $mysqli->query($query) or die($mysqli->error.__LINE__);
Basicaly the -> and as well why its query there ?
Here $mysqli is a object. A object is collection of variables and function in object variables are called properties and functions are called methods.
This $mysqli object also have some properties and method and query() is its method. To access the method or properties of object we have to use -> sign.
$mysqli->query() // its calls the query() method of $mysqli object. where object name comes before -> and method query() after -> sign.