Jump to content

search for string:


sniped22

Recommended Posts

Another question so soon? yes!

 

I need to parse through text that was entered by the user to find two words in a row, "Dealt to"

 

so i find the "dealt to" line and after that is a word which I would like to change the color of.

for example:

Dealt to CheeseMan [X Y] // I would like to A) find this line b)change the text of 
//CheeseMan to blue C) represent X with x.jpg and y with y.jpg

 

thanks again for all of your help!

Link to comment
https://forums.phpfreaks.com/topic/53106-search-for-string/
Share on other sites

when I use strpos:

 

$pos = strpos($ph, $findme);

 

I am returned with the character's number. How do I go about editing the characters after that number?

 

example:

 

$pos returns 100, how do I go about editing character number 102?

 

or at least how do I get the string that starts at the "D" in dealt to and ends with the "[" in [X Y]

 

Thanks again

Link to comment
https://forums.phpfreaks.com/topic/53106-search-for-string/#findComment-262333
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.