rem Posted June 15, 2006 Share Posted June 15, 2006 Hi everybody,How can I erase all chars in a string after a given point (like / , <>, or . ) ?ex: This is an example ... I need everything erased after the three points Thanks a lot, any help would be very appreciated!Regards,Rem. Quote Link to comment https://forums.phpfreaks.com/topic/12037-erase-chars-from-a-string-a-given-point/ Share on other sites More sharing options...
poirot Posted June 15, 2006 Share Posted June 15, 2006 Use a combination of substr and strpos:[a href=\"http://www.php.net/substr\" target=\"_blank\"]http://www.php.net/substr[/a][a href=\"http://www.php.net/strpos\" target=\"_blank\"]http://www.php.net/strpos[/a] Quote Link to comment https://forums.phpfreaks.com/topic/12037-erase-chars-from-a-string-a-given-point/#findComment-45768 Share on other sites More sharing options...
rem Posted June 15, 2006 Author Share Posted June 15, 2006 [!--quoteo(post=384042:date=Jun 14 2006, 07:34 PM:name=poirot)--][div class=\'quotetop\']QUOTE(poirot @ Jun 14 2006, 07:34 PM) [snapback]384042[/snapback][/div][div class=\'quotemain\'][!--quotec--]Use a combination of substr and strpos:[a href=\"http://www.php.net/substr\" target=\"_blank\"]http://www.php.net/substr[/a][a href=\"http://www.php.net/strpos\" target=\"_blank\"]http://www.php.net/strpos[/a][/quote]Thanks a lot for the tip :) I'll surelly look into that! Quote Link to comment https://forums.phpfreaks.com/topic/12037-erase-chars-from-a-string-a-given-point/#findComment-45771 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.