3
I can already display the year inside the foreach by position, as I do to display the month too?
The array is coming like this, the month in case would be that 3, 2, 3, 4 wanted to display this value inside my foreach (this is the var_dump in the variable files)
array (size=2)
2016 =>
array (size=1)
3 =>
array (size=1)
2 =>
object(stdClass)[44]
...
2017 =>
array (size=3)
2 =>
array (size=1)
1 =>
object(stdClass)[45]
...
3 =>
array (size=1)
3 =>
object(stdClass)[46]
...
4 =>
array (size=1)
2 =>
object(stdClass)[47]
...
That’s my foreach, how could I do that?
<ul class="blogcat">
<?php foreach ($arquivos as $k => $a): ?>
<li>
<a href="#"><?= $k; ?></a>
<ul>
<li><a href="#"><?= 'exibir o mes' ?></a></li>
</ul>
</li>
<?php endforeach; ?>
</ul>
Puts it really, needed another foreach had forgotten me! Thanks Peter worked perfectly!
– viniciussvl
Thanks! I’m glad I helped you.
– Pedro Souza