I have done some research but I haven't found a straight answer to my question.
Is doing a count before a loop is the good way to do it ?
Is that better to do :
if(count(array) > 0){
foreach(array as entry){
}
}
OR
foreach(array as entry){
}
From my point of view, the count is an extra step because if the array is empty, we won't loop.
What do you think about it ?