Jump to content

Removing a substring!


zintani

Recommended Posts

Hello,

Thanks to the members of the forum, I was able to make a good process. Now I am trying to delete a specific string of words, for example:

$string = "My ambition is to become a professional php programmer. This ambition in my stage could be impossible but with persistent and commitment nothing is impossible. So I wish good luck for everyone." ;

I would lke to know if it is possible to delete "nothing is impossible" and the following words no matter what are these words. In this example "So I wish good luck for everyone.".

Link to comment
https://forums.phpfreaks.com/topic/247494-removing-a-substring/
Share on other sites

Thanks thorpe,

I think I didn't explain my question well. The question is if there is another string for example:

 

$string1 = "My ambition is to become a professional php programmer. This ambition in my stage could be impossible but with persistent and commitment nothing is impossible. So I wish good luck for everyone." ;

$string2 = "My ambition is to become a professional php programmer. I started learning php last year and It was php server side part and now I am working on regex part. This ambition in my stage could be impossible but with persistent and commitment nothing is impossible. So I wish good luck for everyone." ;

and for both of them I need to start deleting from nothing is impossible.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.