// search for spam strings - can add to an array and loop through it. $spam_array = [ '*****', '购买加拿大学历', '购买澳洲学历' ]; // loop through the spam array and disable adding posts if they match foreach ($spam_array as $spam_text) { if(strpos($get_description, $spam_text) !== false) { $add_post = false; } }