I'm trying to make a breadcrumb dynamic and need to loop to mount the link. For each loop, it needs to repeat the previous items, as in the example below the array and the output.
array( array( 'Bairro' , 'bairro' ) , array( 'Rua' , 'rua' ) )
<a href="bairro">Bairro</a>
<a href="bairro/rua">Rua</a>
The little I got was using unset to generate a new array. After that for to mount the repetition , I still need 2 more loops and revert the order. A little gambiarra.
foreach( $list as $i => $item ){
$newlist[] = $list;
unset( $list[$i] );
}