simon551 Posted June 10, 2007 Share Posted June 10, 2007 This is the actual error the browser is feeding me: XML Parsing Error: not well-formed Location: http://localhost/vtmorg/Admin/New%20Folder/get_contracts.php Line Number 20, Column 16: <Division>M&L</Division> -----------------------------^ I think it has to do with the "M&L" having an & sign in it? Is there a way around this while still keeping the & sign? I'm unable to to this so far. I tried this: $row['Division'] = str_replace("&", " - ", $row['Division']); which works, but then I lose the printed "&" which I kind of need. I guess this is a regex thing but again I don't know how to do it. Quote Link to comment https://forums.phpfreaks.com/topic/55026-solved-xml-parsing-error-invalid-character/ Share on other sites More sharing options...
redarrow Posted June 11, 2007 Share Posted June 11, 2007 works fine dont get what u mean sorry?. <?php $words=" hi there i am red&arrow"; $example = str_replace("&", " - ", $words); echo $example; ?> Quote Link to comment https://forums.phpfreaks.com/topic/55026-solved-xml-parsing-error-invalid-character/#findComment-272007 Share on other sites More sharing options...
simon551 Posted June 11, 2007 Author Share Posted June 11, 2007 thanks. I understand that. I'm trying to do *something else* did you read my post redarrow? I need to be able to print the & sign but the xml parser isn't allowing it... Quote Link to comment https://forums.phpfreaks.com/topic/55026-solved-xml-parsing-error-invalid-character/#findComment-272015 Share on other sites More sharing options...
redarrow Posted June 11, 2007 Share Posted June 11, 2007 http://www.w3schools.com/xml/ go over xml agin it ur formating sorry dont use xml ok. can try a backslash then \& Quote Link to comment https://forums.phpfreaks.com/topic/55026-solved-xml-parsing-error-invalid-character/#findComment-272020 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.