| Welcome to WebmasterWorld Guest from 184.108.40.206 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Pubcon Platinum Sponsor 2014|
|Best way to strip "http://" in simple PHP code|
I have a code like this:
<div class="left">© <a href="<?php bloginfo('url'); ?>">="<?php bloginfo('url'); ?></a> | <a href="<?php bloginfo('url'); ?>/sitemap_index.xml">Sitemap</a></div>
, and it is showing the following result:
C [domain-name.com...] | Stemap
I am wondering if there is any simple way to get rid of "http://" string using PHP ("inline", without using variables etc, like in some tutorials online)
Use preg_match to match all after the http:// part using:
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved