View Full Version : What is the -> for?
matthew tucker
02-07-2003, 11:13 AM
I can't find any reference to the "->" characters ... as in
[$DB_site->query_first], at either the PHP site or SQL site
what does it mean?
Xenon
02-07-2003, 11:22 AM
Hmm, afaik it has to do with the objectoriented part of php.
$DB_site is an object and -> calls a method from this object (in your example query_first)
it has to do with classes in php
filburt1
02-10-2003, 04:58 PM
Analogy: it's like . in Java/VB; it's used to access a member property or method of an object.
So $DB_site->query_first() calls the query_first() method of that instantiation of whatever class $DB_site is.
http://www.php.net/manual/en/language.oop.php
Dominick
02-19-2003, 07:43 PM
or if you called mysql_fetch_object then
echo row->foo
mind you im a bit rusty but there are a few purposes...
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.