mercredi 25 mai 2016

Echo something inside loop using variable concatenization

How can I echo active in position of $HERE when if($i++ == 0) ?

  $i = 0;
  foreach ( $images as $img) {

    $carousel .= '
    <div class="item $HERE">
      ...
    </div>
    ';

  }

Aucun commentaire:

Enregistrer un commentaire