This is my first question on this wonderful site.
Suppose I have a line. $a="some text..%PROD% more text"There will be only one line %..%. I need to replace PRODbetween the %other contents of a variable. So I did:
$a = str_replace('%PROD%',$var,$a);
but now PRODbetween %began to arrive in different cases. So I could expect prod or prod. So I made the entire line in uppercase before doing the replacement. But a side effect is that the other letters in the original string also became uppercase. Someone suggested I use regex. But how?
Thank,
Rohan
source
share