What is more efficient for the following loop operation in PHP:
$k = count($array);
for ($i = 0; $i < $k; $i++)
{
echo $array[$i];
}
Or
for ($i = 0; $i < count($array); $i++)
{
echo $array[$i];
}
I know that in JavaScript there is something like this possible and more efficient:
for (i = 0, j = array.length; i < j; i++)
{
console.log(array[i]);
}