HI,
I'm doing a simple function retrieve data and export the data into xml, but found out xml does not like all character. The character I have found are '&','','<','>','£'. So I have developed a simple function that will replace curtain character within a string with the HTML code that XML likes. '&','¬','<','>','£'
It seems to work with all character, but apart from "£" sign. The only reason is because if i use the below code
while($i < strlen($value)){
$ia=0;
$sign = $value{$i};
while($ia < count($strarValidation)){
if($strarValidation[$ia] == $sign){
$sign = $strarNewChar[$ia];
break;
}
$ia++;
}
$endValue.= $sign;
The value at $sign = $value{$i}; for a £ is the HTML code, not "£". So the function can't be used...
Does anyone else know of a way that I can stop the "£" converting to the html code when converting the string variable into a array?
Thanks