<?php
$HTTP_USER_AGENT = "asf";
$seoagents = "test,test2,test3";
$custom1agents = explode(",",$seoagents);
//echo implode('|', $custom1agents);
if(preg_match('/('.implode('|', $custom1agents).')/i', $HTTP_USER_AGENT, $match))
{
echo "matched"
}
else
{
echo "did not match"
}
- Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.29
- Parse error: syntax error, unexpected '}', expecting ',' or ';' in /in/Ide0u on line 10
Process exited with code 255.
preferences:
197.29 ms | 1395 KiB | 66 Q