MySQL Forums
Forum List  »  PHP

Re: Match for a word in a text with the PHP script
Posted by: samuel tarcin
Date: May 06, 2020 06:36AM

There are different functions and ways to match a word in PHP. Best way is using preg_match() function. In the following example we will search the forum word in the $bigtext content.
preg_match('/forum/',$bigtext)
Look: https://www.poftut.com/check-string-contains-specific-word-php/

Options: ReplyQuote


Subject
Written By
Posted
Re: Match for a word in a text with the PHP script
May 06, 2020 06:36AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.