How do I add case insensitive feature to the preg_replace function. I read that it is “/i” but exactly where do I add it?
$main[] = "/\\b".$row['main']."\\b/";
$linkedarticle = preg_replace($main, $keyword, $article, 1);
How do I add case insensitive feature to the preg_replace function. I read that it is “/i” but exactly where do I add it?
$main[] = "/\\b".$row['main']."\\b/";
$linkedarticle = preg_replace($main, $keyword, $article, 1);
$main[] = "/\\b".$row['main']."\\b/i";
Additionally, [fphp]preg_quote[/fphp] may come in handy as you’re dynamically building your pattern.
Haha perfect, thanks!