Month: February 2020
-
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; ?…
-
Printing first characters of a text
This prints first 200 characters of a given text. $content = $this-artist-name; $pos = strpos($content, ‘ ‘, 200); echo substr($content,0,$pos ); …