php if statement string having a certain word code example Example: check if string contains substring php 8 str_contains('STRING', 'SUB_STRING');