Problems with CONSTANTS that does not get defined
| From: | HKG) | Date: | Fri, 05 Mar 2004 12:17:41 +0000 |
| Subject: | Problems with CONSTANTS that does not get defined | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-23068@lists.php.net to get a copy of this message | ||
Running this code:
[...]
// META DATA DEFINES
define("META_DATA", -1);
define("NUM_LINES", 0);
[...]
define("JOB_CMD", 5);
define("FIVE", 5); // DEBUG
[...]
function ...()
{
$atlist = at_job_list();
$UserJobNr = 0;
$UserJobList[META_DATA][NUM_LINES] = 0;
$numJobs = $atlist[META_DATA][NUM_LINES];
for ($i=1; $i<= $numJobs; $i++) {
// DEBUG START
$test_5 = $atlist[$i][5];
$test_FIVE = $atlist[$i][FIVE];
$test_JOB_CMD = $atlist[$i][JOB_CMD];
print "<pre>USER JOB LIST GET/JOB_CMD: /" . $atlist[$i][JOB_CMD] .
"/$test_5/$test_FIVE/$test_JOB_CMD</pre>\n";
// DEBUG END
if (user_own_this_job($User, $atlist[$i][JOB_CMD]) ) {
print "<pre>Has job $i</pre>\n"; // DEBUG
$UserJobNr++;
$UserJobList[$UserJobNr] = $atlist[$i];
$UserJobList[$UserJobNr][JOB_UID] = $UserJobNr;
}
}
[...]
}
gives this out put:
Warning: constant(): Couldn't find constant FIVE in [file] on line 238
FIVE: FIVE/
Warning: constant(): Couldn't find constant JOB_CMD in [file] on line 239
JOB_CMD: JOB_CMD/
USER JOB LIST GET/JOB_CMD: //job1 user1//
USER JOB LIST GET/JOB_CMD: //job2 user1//
USER JOB LIST GET/JOB_CMD: //job1 user2//
To say the less, I am a bit confused. Any hints or tips would be appreciated.