开发者

Extra space before and after text link!! Need to remove!

开发者 https://www.devze.com 2023-01-24 08:06 出处:网络
I have a text link generated in PHP for bread crumbs, and I can\'t figure out how to eliminate the extra space before and after the link that is generated.This is the LAST LINK:

I have a text link generated in PHP for bread crumbs, and I can't figure out how to eliminate the extra space before and after the link that is generated. This is the LAST LINK:

Website link: link text

 <div id="crumbs">
 <a class="crumbs" href="http://www.myorphan.com/index.htm">HOME&开发者_Go百科lt;/a>//<a class="crumbs"
 href="http://www.myorphan.com/blog/">BLOG</a>//<a  class="crumbs caps"><?php if ( is_day() ) : ?>
 <?php printf( __('Daily Archives: <span>%s</span>', 'twentyten'), get_the_date()); ?>
 <?php elseif ( is_month() ) : ?>
 <?php printf(__('Monthly Archives: <span>%s</span>', 'twentyten'), get_the_date('F Y')); ?>
 <?php elseif ( is_year() ) : ?>
 <?php printf( __('Yearly Archives: <span>%s</span>', 'twentyten'), get_the_date('Y')); ?>
 <?php else : ?>
 <?php _e('Blog Archives', 'twentyten'); ?>
 <?php endif; ?>
 </a>//</div>


trim($mystring)


This is the blind way of doing it, but try this:

 <div id="crumbs">
 <a class="crumbs" href="http://www.myorphan.com/index.htm">HOME</a>//<a class="crumbs"
 href="http://www.myorphan.com/blog/">BLOG</a>//<a  class="crumbs caps"><?php if ( is_day() ) : ?>
 <?php printf( __('Daily Archives: <span>%s</span>', 'twentyten'), trim(get_the_date())); ?>
 <?php elseif ( is_month() ) : ?>
 <?php printf(__('Monthly Archives: <span>%s</span>', 'twentyten'), trim(get_the_date('F Y'))); ?>
 <?php elseif ( is_year() ) : ?>
 <?php printf( __('Yearly Archives: <span>%s</span>', 'twentyten'), trim(get_the_date('Y'))); ?>
 <?php else : ?>
 <?php _e('Blog Archives', 'twentyten'); ?>
 <?php endif; ?>
 </a>//</div>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号