Hey i want to search for a word in a string, e.g
string = "Hello my name is Bill";
say i want to search for Bill, i want to replace it will <b>Bill</b>. Problem is I was using str_replace and it would only work for Bill and not bill, what expression would i need for it to ignore caseing? i also tried str_ireplace but it would convert Bill to bill. Any help?
Sorry forgot to add that the main problem is that if i pass in the string bill, it is replacing Bill with bill, when all i want to do is bold the word. An bill is only an example, i will be passing in various variables.
string = "Hello my name is Bill";
say i want to search for Bill, i want to replace it will <b>Bill</b>. Problem is I was using str_replace and it would only work for Bill and not bill, what expression would i need for it to ignore caseing? i also tried str_ireplace but it would convert Bill to bill. Any help?
Sorry forgot to add that the main problem is that if i pass in the string bill, it is replacing Bill with bill, when all i want to do is bold the word. An bill is only an example, i will be passing in various variables.