note 117797 deleted from control-structures.goto by cmb

From: Date: Tue, 11 Aug 2015 21:47:52 +0000
Subject: note 117797 deleted from control-structures.goto by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-203311@lists.php.net to get a copy of this message
Note Submitter: Jonathan Kim ---- I am using GOTO in my ajax php file. This ajax returns warning, "Cannot use a scalar value as an array", when I don't declare array before using it, so I did. However, if execution takes route of GOTO, I still get the same warning message, as if the array declaration is unset. Working around, I had to adjust my code to ensure that 1. no data is stored to the array before the last GOTO appears 2. use a variable to verify if GOTO was executed 3. conditionally declare array variable again after GOTO anchor. Google did not find anything about it. I wonder if anyone else has the same experience. Jonathan Kim

« previous php.notes (#203311) next »