问题
I need to change the output of <?php echo $EM_Category->name; ?> to lowercase only.
Output now is Entertainment. How would I get it to entertainment
Full section of code is:
<?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; ?>
回答1:
<?php echo strtolower($EM_Category->name); ?>
http://us.php.net/strtolower
回答2:
That would be the strtolower function.
<?php echo strtolower($EM_Category->name); ?>
回答3:
<?php echo strtolower($EM_Category->name); ?>
回答4:
In PHP you use:
echo strtolower($EM_Category->name);
来源:https://stackoverflow.com/questions/7941610/format-output-to-lowercase