Thread: Coding nicely
View Single Post
Old 12-05-2007, 05:19 PM   #3 (permalink)
Matt83
The Contributor
Upcoming Programmer 
 
Matt83's Avatar
 
Join Date: Oct 2007
Location: Argentina
Posts: 72
Thanks: 18
Matt83 is on a distinguished road
Default

Thanks Tanax for this post, I tend to see and process inside these different alternatives as i might be missing a technique or concept that could improve my workflow, as an example this post changed the way i write my variables, but back on your post i can say that i dont think the examples mentioned above qualify as bad code. This is like saying that coke is better than pepsi or the other way around.
Anyways, for me now a days i found this style to work much "better":

PHP Code:
if ($_GET['szUser'] == 'Tanax')
{
    
// execute tanax
}
else
{
    
// someone who isn't tanax

__________________
http://www.mattvarone.com
Matt83 is offline  
Reply With Quote