jponte Posted February 26, 2010 Share Posted February 26, 2010 Hi, I'm trying to learn and I could not find a good definition for this operator which I have seen a lot: if(!empty($row->LastName)) Thanks, J P Link to comment https://forums.phpfreaks.com/topic/193515-what-does-means/ Share on other sites More sharing options...
aebstract Posted February 26, 2010 Share Posted February 26, 2010 Pulling data from a database? LastName is the column you're grabbing in this case. $row is set somewhere above around your query so you can grab various columns. Link to comment https://forums.phpfreaks.com/topic/193515-what-does-means/#findComment-1018716 Share on other sites More sharing options...
ohdang888 Posted February 26, 2010 Share Posted February 26, 2010 when you see a "->" being used, it has to do with objects and php classes. Do you know about arrays? for an array you would use $test['myvar'] , for an object, you would use $test->myvar You build an object using a "class", check out this tutorial: http://edrackham.com/php/php-class-tutorial/ Link to comment https://forums.phpfreaks.com/topic/193515-what-does-means/#findComment-1018717 Share on other sites More sharing options...
ohdang888 Posted February 26, 2010 Share Posted February 26, 2010 Pulling data from a database? LastName is the column you're grabbing in this case. $row is set somewhere above around your query so you can grab various columns. if you were using mysql_fetch_assoc() then ya Link to comment https://forums.phpfreaks.com/topic/193515-what-does-means/#findComment-1018718 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.