Friday, 15 May 2015

PHP Check Text in Variable after N text -


How to check the value variable that includes the text after the text.

Example:

$ a = "I Need You";

Then do something PHP:

  & lt ?? Php check if you got a text "$" in text after text, then goto gotte "you"? & Gt;  

How can I do this?

You can do this like this:

  $ a = "I need you"; $ Search = "need"; $ Substring = substr ($ a, strpos ($ a, $ search) + strlen ($ search)); Echo $ substring;  

resonance "you"


No comments:

Post a Comment