I have a string $string, i want to add a < to the begning and a > to the end so that if $string == "mystring" i should get <mystring>
I think should have been in the Newbie section 🙂
try
$string = "<$string>"; or $string = "<" . $string . ">";
HalfaBee
try this
$newstring = "<"; $newstring .= $string; $newstring .= ">";
Nice and simple.. I was gonna show you with String Functions.. But 3 lines is easier than 10+
this way it ignores whatever is inthe <>, i need to do something like this: $gt = ">"; $lt = "<"; thanks though.
Try this
$string = htmlentities("<$string>"😉;