arrays - Issue with count() in php -


i have following code block in controller

$reportpostcountarray = $this->objusermodel->findduplicatereportpost($payloaddata['user_id'], $payloaddata['post_id']); var_dump($reportpostcountarray);  count($reportpostcountarray); var_dump(is_array($reportpostcountarray)); 

and output above code following:

array(1) {   [0]=>   object(stdclass)#179 (1) {     ["post_count"]=>     int(1)   } } bool(true) 

please me correct why not getting count value though return array size 1.

that want do:

var_dump($count($reportpostcountarray)); 

you not printing count value var_dump() array , return value of is_array() indeed boolean, in case true.


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -