Advertisement
lorro
Mar 8th, 2023 (edited)
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. The PHP function strpos() can do that.
  2.  
  3. if( strpos( $note->content, 'Answer to the Secret Question' ) === 0 ) {
  4.  
  5. The === means the test string must be at the beginning of the content to give TRUE.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement