I am not understanding why 'true' isn't the result of this syntax because $subjects equals: $subjects = "Delivery Status Notification(Failure)"; Here is my syntax: if ( stristr( $subjects, "Delivery Status Notifcation(Failure)" ) ) { $TIRSFlag = true; echo "true"; }