This one is just to much

Ok, now this one has me putting my hands up an shoutin’ “this one’s to much!”

I’m working on rewriting an old pile of sludge that hurts my eyes, properly porting it to the new interface that works better… So far, so good, except for the fact that the actual bi-language mingle used for both logic and display, is about as undocumented and about as helpful, as a bullet in the toe.

All was going well in trying to understand it, until I saw this kind of thing:

/* NB: I probably added most of this indentation myself */
$query4 = *_query("look up a user", $dbh);
$name=*_fetch_array($query4, $dbh);
echo "<font color='#6699ff'><b".$name['the users name']."</b></font><BR><BR>";
echo "<table border='1' cellspacing='0' cellpadding='3'><tr border='0'><td align='left' border='0'><font color='#6699ff'><b>some header</b></font>";

$query = *_query("look up first section from database", $dbh);
if ($query) {
$nr = *_num_rows($query, $dbh);
for ($k=0;$k<$nr;$k++) {
$topic = *_fetch_array($query, $dbh);
echo "&nbsp;".$topic['the topics name']."&nbsp;";
// ... do other crap

Where ‘the topics name’ is looking up a row in the database, which contains a non breaing space: &nbsp; ALL THAT FOR WRITING A FREAKING BLANK SPACE !? I have no idea if that was a quick and dirty way of cutting an item out of the list or what (before I took over), but for crying out loud… If I ever did something so moronic, I would shoot myself before leaving it for someone to find.

THANK GOD THAT I DID NOT CREATE THIS MODULE …. Even if I’m the sap whose got to keep it running like a swiss clock :