Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1537 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     PHP and MySQL :

Poorly written code hurts my soul...

Thread title: Poorly written code hurts my soul...
     
    Thread tools Search this thread Display Modes  
Prev Previous Post   Next Post Next
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

     


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed