本文整理匯總了PHP中Attachments::rewind方法的典型用法代碼示例。如果您正苦於以下問題:PHP Attachments::rewind方法的具體用法?PHP Attachments::rewind怎麽用?PHP Attachments::rewind使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Attachments
的用法示例。
在下文中一共展示了Attachments::rewind方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: while
<div class="row">
<div class="col-md-6"><input class="form-control required" name="name" pattern="[a-zA-Z0-9 ]+" type="text" placeholder="Name"></div>
<div class="col-md-6"><input class="form-control email required" name="email" type="email" placeholder="Email"></div>
</div>
<div class="row">
<div class="col-md-12"><textarea class="form-control required" name="message" placeholder="Message"></textarea></div>
</div>
<div class="row">
<div class="col-md-12"><input class="btn btn-primary form-control" type="submit" value="Send Message"></div>
</div>
</form>
</div>
<div class="col-md-4 side">
<?php
if ($attachments->exist() && $attachments->total() > 1) {
$attachments->rewind();
?>
<div class="row" id="gallery-controls">
<?php
while ($index = $attachments->get()) {
?>
<div class="col-md-6<?php
if ($index->id == $attachments->id(0)) {
?>
active<?php
}
?>
">
<div class="thumbnail<?php
if ($index->id == $attachments->id(0)) {
?>