how can I get out certain parts out of a string? for example, I want to filter out the "http://" of a URL... is there a function in PHP for this?
tnx
| SitePoint Sponsor |


how can I get out certain parts out of a string? for example, I want to filter out the "http://" of a URL... is there a function in PHP for this?
tnx





$url = "http://www.yahoo.com";
$url = str_replace("http://", "", $url);
Now $url is http://www.yahoo.com
<Edited by freddydoesphp on 02-02-2001 at 06:54 PM>
Please don't PM me with questions.
Use the forums, that is what they are here for.



Was it the forum or was it a typo freddy...
Now $url is http://www.yahoo.com
SiteOptions >> Services :: Products :: Contact
Developers of PHP, C++, Visual Basic, MySQL, and more!





Bleepin' forum softawre its supposed to be regular old <pre>[pre]www.yahoo.com[/pre]</pre> without the http://
Please don't PM me with questions.
Use the forums, that is what they are here for.



I thought it probably was the software :-)
SiteOptions >> Services :: Products :: Contact
Developers of PHP, C++, Visual Basic, MySQL, and more!


lol, what is this forum doing??![]()



Well it is actually a very useful feature,
If you uncheck do not parse urls it wont do it..
SiteOptions >> Services :: Products :: Contact
Developers of PHP, C++, Visual Basic, MySQL, and more!





I probably should have known that. DIMA did that answer your question?
Please don't PM me with questions.
Use the forums, that is what they are here for.


yep, that's what I searched for. thx freddy![]()
Bookmarks