Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.