RE: [PHP] Simple: Whats wrong with this?

From: Date: Wed, 17 Mar 2004 17:43:37 +0000
Subject: RE: [PHP] Simple: Whats wrong with this?
Groups: php.general 
Request: Send a blank email to php-general+get-180715@lists.php.net to get a copy of this message
Shane McBride <mailto:smcbride@rditech.net> on Wednesday, March 17, 2004 9:40 AM said: > No, the value still is not incrementing. then you must be resetting it unknowingly or the else block in your if..else statement is not being executed like you are expecting it to be. one thing i do to debug this kind of thing is to add some echo statements to the different code blocks to see what's happening. for example: if($expression) { echo "here i am!"; blow_up_world(); } else { echo "y hello thar!"; eat_cheese(); } then when i execute the page i know what i am expecting and i can compare that to what i am *actually* getting. for example, if i am expecting to see "here i am!" but instead i see "y hello thar!" i can know that something is going wrong with my expression. hth, chris.

« previous php.general (#180715) next »