本文整理汇总了PHP中helper::slug方法的典型用法代码示例。如果您正苦于以下问题:PHP helper::slug方法的具体用法?PHP helper::slug怎么用?PHP helper::slug使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类helper
的用法示例。
在下文中一共展示了helper::slug方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: base64_encode
<!-- LEAVE COMMENT -->
<div class="row">
<div class="span12 column-divider">
<span class="column-divider-icon pull-left"><i class="icon-comment comment-icon-fix"></i></span>
<h4>Schreib' was</h4>
</div>
</div>
<div id="contact_form">
<form action="/comment/place/<?php
print base64_encode($entry->id + 1337);
?>
#comments" id="form" method="post">
<input type="hidden" name="backto" value="<?php
print base64_encode("/places/{$place->username}/{$entry->id}/" . helper::slug($entry->headline));
?>
"/>
<textarea rows="6" class="placeholder span12" name="comment" placeholder="Kommentar"></textarea>
<input class="submit darkbtn" type="submit" value="Abschicken">
</form>
</div>
<br>
<!-- SHOW COMMENTS -->
<a name="comments"></a>
<div class="row">
<div class="span12 column-divider">
<span class="column-divider-icon pull-left"><i class="icon-comments comment-icon-fix"></i></span>
示例2: foreach
<?php
if (count($newest_entries)) {
?>
<ul class="no-list">
<?php
foreach ($newest_entries as $newest_entry) {
?>
<li style="margin:10px 0;">
<a href="/places/<?php
print $newest_entry->User->username;
?>
/<?php
print $newest_entry->id;
?>
/<?php
print helper::slug($newest_entry->headline);
?>
">
<?php
print $newest_entry->headline;
?>
</a><br>
<p><i class="icon-time"></i> <?php
print date('d.m.Y - H:i:s', strtotime($newest_entry->created));
?>
</p>
</li>
<?php
}
?>
示例3: foreach
print $place->username;
?>
</h5>
<ul class="cats">
<?php
foreach ($diaries as $diary) {
?>
<li>
<a href="/places/diary/<?php
print $place->username;
?>
/<?php
print $diary->id;
?>
/<?php
print helper::slug($diary->name);
?>
">
<?php
print $diary->name;
?>
</a>
</li>
<?php
}
?>
</ul>
</div>
<?php
}
?>