How to get value count from multidimentional array? PHP / Laravel

I am trying to count values of this array:

array:5 [▼
"layout/theme.liquid" => array:5 [▶]
"sections/featured-product.liquid" => array:1 [▶]
"sections/header.liquid" => array:2 [▶]
"templates/article.liquid" => array:1 [▶]
"templates/product.liquid" => array:1 [▶]
]

My goal is to count inside this array how many there are arrays? The answer is 10, but stuck on trying to write the code properly.

The array example is being shown by dd(count($jsonLdAssets));



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2xKwYiI
via IFTTT

تعليقات

المشاركات الشائعة من هذه المدونة

I am unable to figure out how to create payment collection request, after a form has been submitted in laravel

laravel, mysql transaction not working after failed one time