I need something like this:
$string = "That's a big apple, a red apple";
$arr = array(apple, lemon);
$arr2 = array(APPLE, LEMON);
preg_replace('/($arr)/i', $arr2, $string, 1);
//output = That's a big APPLE, a red apple
It means replace words for uppercase using arrays but only the first match, case-insensitive.