How to calculate how many items in a foreach?
I want to count total rows.
foreach ($Contents as $item) { $item[number];// if there are 15 $item[n
You don't need to do it in the foreach.
foreach
Just use count($Contents).
count($Contents)