Vivid Lust Posted October 30, 2008 Share Posted October 30, 2008 Hi all! How can I turn: http://www.bbc.co.uk into: bbc Thanks! Link to comment https://forums.phpfreaks.com/topic/130719-delete-part-of-a-string-with-php/ Share on other sites More sharing options...
gaza165 Posted October 30, 2008 Share Posted October 30, 2008 Would you like this to be the case for every link i.e www.ananova.com = ananova www.ministryofsound.com = ministryofsound ????????????????? Link to comment https://forums.phpfreaks.com/topic/130719-delete-part-of-a-string-with-php/#findComment-678375 Share on other sites More sharing options...
Vivid Lust Posted October 30, 2008 Author Share Posted October 30, 2008 yeah every link, in the form of: http://www.X.com Link to comment https://forums.phpfreaks.com/topic/130719-delete-part-of-a-string-with-php/#findComment-678378 Share on other sites More sharing options...
Vivid Lust Posted October 30, 2008 Author Share Posted October 30, 2008 how about, so it works with mostly all domains, be able to delete http://www. untill the next "." Any ideas? Thanks Link to comment https://forums.phpfreaks.com/topic/130719-delete-part-of-a-string-with-php/#findComment-678395 Share on other sites More sharing options...
gaza165 Posted October 30, 2008 Share Posted October 30, 2008 <?php $string = "http://www.google.com"; $link = explode(".",$string); echo $link[1]; // This will bring back ---- google Link to comment https://forums.phpfreaks.com/topic/130719-delete-part-of-a-string-with-php/#findComment-678405 Share on other sites More sharing options...
Vivid Lust Posted October 30, 2008 Author Share Posted October 30, 2008 Thanks loads! Link to comment https://forums.phpfreaks.com/topic/130719-delete-part-of-a-string-with-php/#findComment-678416 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.