Too Big World

The Blog of Gordon Milcham

Check and confirm if string exist in text

/

<?php if( $this->artist->review ): ?>
	<?php
		$word = "system-readmore";
		$mystring = $this->artist->review;
// Test if string contains the word 
		if(strpos($mystring, $word) !== false){
	
		echo "Word Found!";
		} else {
		echo "Word Not Found!";
		}
	?>
<?php endif; ?>

Discover more from Too Big World

Subscribe to get the latest posts sent to your email.

Categories:

Tags:


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.