How can I count the number of times http appears in a table space entry?
I would like to use that number for an if statement to delete automated spam
entries from my forum when http appears more than 10 times.
The views expressed on this page by users and staff are their own, not those of NamePros.
<?php
$a = 'this is my http test which has a few http in it http';
$expression = '/http/';
preg_match_all($expression, $a, $matches);
$count = count($matches[0]);
echo $count;
?>