gorilla1
03-21-2009, 05:59 PM
If I want to replace a character in a string with the character '<', how do I do this? Anything I try, including escaping like so:
substr_replace($rs, '\<?', 0 ) causes an error.
This is what I would like to to do:
$rs = "1?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>";
$rs = substr_replace($rs, '<?', 0 );
so that rs will equal:
<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>
G
substr_replace($rs, '\<?', 0 ) causes an error.
This is what I would like to to do:
$rs = "1?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>";
$rs = substr_replace($rs, '<?', 0 );
so that rs will equal:
<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>
G