Jump to content

How to take a word from a string?


phpSensei

Recommended Posts

Hello,

 

wow its been a looooooooooong time since I've been here. Back in the day i use to help out all the noobs lol, but now its time to be helped.

 

Simple and stupid question

 

Lets say I have a random sentence everytime a refresh a page, but every sentence will have the word "apple" in there...

 

ALSO the words apple are in [ b ] bbcodes on purpose.

 

I like eating [b]apples[b] all day long. Because [b]apples[/b] are good.

 

now i want to know how to delete everything outside the [ b ] [ /b ] tags...

 

I DONT WANT TO USE EXPLODE! I want to specifically delete everything but preserve any word within the bold tags.

Link to comment
https://forums.phpfreaks.com/topic/164818-how-to-take-a-word-from-a-string/
Share on other sites

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.