lundi 27 août 2018

Print class inside echo once in foreach and ignore in other loops

i have foreach like this

foeach($lists as $list){
echo '<li class="">'. $list .'</li>';
}

how i can add active to first li class once like this class="active" and other loops show with empy class "default"



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire