View Single Post
11-03-2007, 01:42 AM
#1
patrickPaul is offline patrickPaul
Status:
Join date: Dec 2004
Location: California, US
Expertise:
Software:
 
Posts: 406
iTrader: 1 / 100%
 

patrickPaul is on a distinguished road

Send a message via AIM to patrickPaul Send a message via MSN to patrickPaul Send a message via Yahoo to patrickPaul

  Old  Poorly written code hurts my soul...

Hey guys,

Just ran across this and thought it was worthy enough to start a thread...

PHP Code:
<?php

//...

function title($item)
   {
     
?>
 <?=$item["TITLE"];?>
 <?
   
}

//...

?>
It scares me what some people do... Anyone seen worse while working on someone else's code?

Just thought I'd add for any non-programmers reading this... The proper way to do this is simply:

PHP Code:
<?php

// ...

function title($item) {
    echo 
$item['TITLE'];
}

//...

?>
Best Regards,
Patrick