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 Quote Link to comment 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. Quote Link to comment 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/ Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.