<?php
for ($i=$j=0; $i<5; $i++) {
<div class='card
<?php
if($i<3){
echo "delay" . $j += 5;
}
?>'>
}?>
I tried the above code but got syntax error.
my desire output is like this
<div class="box delay5">
<div class="box delay10">
<div class="box">
<div class="box">
you must hide the whole PHP code like this.
<?php
for ($i=$j=0; $i<5; $i++) {
?>
<div class='card
<?php
if($i<3){
echo "delay" . $j += 5;
}
?>
'>
<?php } ?>
not nice but it will goes his socialism way.
close php tags correctly.
<?php
for ($i = $j = 0; $i < 5; $i++)
{
?>
<div class='card <?php if ($i < 3) { echo "delay" . $j += 5; } ?>'>
<?php
}
?>
<?php
for ($i=$j=0; $i<5; $i++) {
?>
<div class='card'>
<?php
if($i<3){
echo "delay" . $j += 5;
}
}
?>