I have the following code:
<?php if($count >= 10){
do this
}?>
Using this code:
<?php print_r($count); ?>
I see the contents of $count as
Array ( [0] => stdClass Object ( [COUNT(*)] => 12 ) )
Question is: How do I get the 12 in the object array to be used in my IF statement?
Note that
$countlooks very much like the result of an SQL query. In that case, simply replaceSELECT COUNT(*) FROM ...withSELECT COUNT(*) AS foocount FROM .... Also, you can fetch into an array instead of an object.