php
$nn="ab bc cd cd ab";
$tttt=str_ireplace("cd","aaa",$nn);
$tt=str_ireplace("ab","aaa",$tttt);
but the below coding is not working
$nn="ab bc cd cd ab";
$tttt=str_ireplace("cd" or "ab","aaa",$nn);
The output is "aaa bc aaa aaa aaa".PLease help me in simplyfying it.because there are lot more str replaces for various words.