Detect HTML tags in a string

2/09/2021  •  2081 views
 
A simple solution is:

<?php
if($string != strip_tags($string)) {
 // contains HTML
}/?>
 English / Indonesian