Answer the question
In order to leave comments, you need to log in
In yii2 it gives the error "syntax error, unexpected 'else' (T_ELSE)", what does this mean?
<section class="text-center mb-4">
<div class="row wow fadeIn">
<?php if (!empty($products)): ?>
<?php foreach ($products as $product): ?>
<div class="col-lg-4 col-md-6 mb-4">
<div class="card">
<div class="view overlay">
<?= Html::img("@web/img/{$product->img}",['class' => 'img-fluid pt-4']); ?>
<a href="">
<div class="mask rgba-white-slight">
</div>
</a>
</div>
<div class="card-body text-center">
<a href="" class="grey-text">
<h5><?= $product->content ?></h5></a>
<h5>
<strong><a href="" class="dark-gray-text"><?= $product->name ?>
<!-- <span class="badge-pill danger-color"></span> -->
</a></strong>
</h5>
<h4 class="font-weight-b blue-text">
<strong><?= $product->price ?> тг</strong>
</h4>
<button type="button" class="btn btn-outline-light-blue">Купить</button>
</div>
</div>
</div>
<?php else: ?>
</div>
<?php endif; ?>
</section>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question