I am currently using this:
if(strtolower(substr($subject,0,3)) != 're:' and strtolower(substr($subject,0,3)) != 'fw:' and strtolower(substr($subject,0,1)) != '#' and strtolower(substr($subject,0,5)) != 'read:') {
to check if the first characters of the $subject variable are not equal to,
- re:
- fw:
- #
- read:
in uppercase or lowercase, how can i check exactly the same thing but by using items contained in an array instead?
like:
$array = array("re:", "fw:", "#", "read:");
foreachin phppreg_matchwith an array for the haystack and a regex like^re:|^fw:|^#|^read: