View Single Post
11-09-2007, 10:59 PM
#20
Wildhoney is offline Wildhoney
Wildhoney's Avatar
Status: Request a custom title
Join date: Feb 2006
Location: Nottingham
Expertise:
Software:
 
Posts: 1,648
iTrader: 18 / 95%
 

Wildhoney is on a distinguished road

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

  Old

It may not be insecure, but it does result in bad usability having a blank page. Even that improved code you pasted, patrickPaul, I couldn't work with pages and pages full of that - but I have done in the past.

Allman style indentation and variable prefixes to denote data types all the way, I wouldn't use capitalised items for my array keys, either. I'd also name the function something less ambiguous than title(), I mean, there's no way you can tell what the function is doing unless you read its contents. I would do something like:

PHP Code:
function getTitle($szItem)
{
    
// Why have we set $szItem in the argument?
    // Was that an example?
    
return $aItem['title'];