我试图在foreach循环中显示图像,但它无法正常工作。我不知道我的代码有什么问题。我希望有人可以帮助我。以下是我的代码
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="row">
<?php foreach ($query as $query): ?>
<div class="col-sm-4 col-lg-4 col-md-4">
<div class="thumbnail">
<img src='".$query['path']."' alt="">
<div class="caption">
<h4 class="pull-right">RM <?= $query['product_price'] ?></h4>
<h4><a href="#"><?= $query['product_name'] ?></a>
</h4>
<p><?= $query['product_desc'] ?></p>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
答案 0 :(得分:1)
更改
exec('task 1', {cwd: cwd}, function (done) {
exec('task 2', {cwd: cwd}, function (done) {
exec('task 3', {cwd: cwd}, function (done) {
// do stuff after task 3
});
});
});
要
<img src='".$query['path']."' alt="">