Monthly Archives: November 2009

The Worst Example of Web Form Validation Ever

I make websites. I spend a lot of my time thinking about how to make websites more user-friendly and efficient. As a result of this, whenever I see a website that has an extraordinarily bad user interface it makes me angry. This particular example of eye-watering inefficiency came in a letter from Camden Borough Town Hall (my local council). Read more »

Beware of the & (ampersand) character when parsing XML using PHP’s SimpleXML

If you are getting errors like “parser error : EntityRef: expecting ‘;’” when trying to parse some XML using SimpleXML, it could be because your XML file or string contains an & character. Do the following to remedy the situation:

$correct_xml = str_replace('&','&',$problem_xml);