Answers for "count key object php"

PHP
0

count object php

$total = count((array)$obj);
Posted by: Guest on July-14-2021
3

php count array elements with specific key

$cnt = count(array_filter($array,function($element) {
  return $element['your_key']=='foo';
}));
Posted by: Guest on July-13-2020

Browse Popular Code Answers by Language