我需要将<?php echo $EM_Category->name; ?>
的输出更改为仅小写。
现在输出为Entertainment
。我如何将其转到entertainment
完整的代码部分是:
<?php foreach(EM_Categories::get(array('orderby'=>'category_name')) as $EM_Category): ?>
<a href="<?php echo THEME_URL; ?>/events/category/<?php echo $EM_Category->name; ?>" class="browse-cat">
<span><?php echo $EM_Category->name; ?></span><img src="<?php echo THEME_URL; ?>/images/box_arrow.png" alt="arrow" height="15" width="15">
</a>
<?php endforeach; ?>
答案 0 :(得分:3)
那将是strtolower函数。
<?php echo strtolower($EM_Category->name); ?>
答案 1 :(得分:1)
<?php echo strtolower($EM_Category->name); ?>
答案 2 :(得分:1)
<?php echo strtolower($EM_Category->name); ?>
答案 3 :(得分:0)
在PHP中,您使用:
echo strtolower($EM_Category->name);