| Welcome to WebmasterWorld Guest from 126.96.36.199 |
register, login, search, subscribe, help, library, PubCon, announcements, recent posts, open posts,
|Subscribe to WebmasterWorld|
|Best way to strip "http://" in simple PHP code|
| 1:59 pm on Jul 1, 2012 (gmt 0)|
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)
| 4:29 pm on Jul 1, 2012 (gmt 0)|
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 ® and PubCon ® are a Registered Trademarks of Pubcon Inc.
© Pubcon Inc. 1996-2012 all rights reserved