Dont know what you mean there. But here is what I understand from your question
<?php
for ($i=0; $i< count($contentdinamit["chart"]["songs"]["song"]); $i++ ) {
if(($i+1)<=10){//limit your item by 10
echo'<li class="up"><a href="'
.$contentdinamit["chart"]["songs"]["song"]["$i"]["artist_name"].'"><strong>'
.$contentdinamit["chart"]["songs"]["song"]["$i"]["song_name"].'</strong></a><br /><a href="'
.$contentdinamit["chart"]["songs"]["song"]["$i"]["artist_name"].'">'
.$contentdinamit["chart"]["songs"]["song"]["$i"]["artist_name"].'</a></li>';
}
}
?>
6
solved How to limit items from for loop?