$i = 0;
while ($slider_query->have_posts()) {
$slider_query->the_post();
$html ='<div class= "col-lg-3 order-lg-'.$i.' col-md-6 p-0">';
$html .= '<div class= "ss-pic">';
$html .= '<img src="'.get_the_post_thumbnail_url(get_the_ID(), 'full').'"/>';
$html .='</div>';
$html .='</div>';
$html ='<div class= "col-lg-3 order-lg-"'.++$i.'"col-md-6 p-0">';
$html .= '<div class= "ss-text">';
$html .= '<h3>'.get_the_title().'</h3>';
$html .= get_the_content();
$html .= '<a href="/gym">Explore</a>';
$html .='</div>';
$html .='</div>';
I want to pre-increment the $i. Can anyone please help me out? I know its a basic, but I have a bit of confusion over the concatenation
question from:https://stackoverflow.com/questions/65559646/how-to-concatenate-increment-operator-to-php