i want to replace '<' and '>' sign in string. e.g
$str = 'if x<y and y>z'; echo str_replace( '<', 'something', $str ) . "\n";
this give the following result
if xsomethingy and y>z
my question is how can i replace '>' to text 'something'
preg_replace(/[<>]/g, 'something', $str)
You need to study some PHP yah
http://php.net/manual/en/function.preg-replace.php
check out preg_replace()
Documentation is here http://php.net/manual/en/function.preg-replace.php
example would be
preg_replace('/[<>]/', 'something', $str);