note 26867 rejected from language.operators.comparison by tix
| From: | tix@php.net | Date: | Fri, 15 Nov 2002 11:50:06 +0000 |
| Subject: | note 26867 rejected from language.operators.comparison by tix | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-39531@lists.php.net to get a copy of this message | ||
Hi,
I've got a problem:
$score contains 20 highscores from a tetris-game i wrote:
$score[1]=name1;
$score[2]=1000;
$score[3]=name2;
$score[4]=500;
$score[5]=name3;
$score[6]=300;
etc.
A player gets a highscore of 750, and the highscore has to be added to the array:
sample code:
$test=750;
for ($a=2; $a<=40 && $test<$score[$a]; $a=$a+2){
echo $a;
}
echo $test
returns: $a=4 and $test=750
Problem:
when $test is provided by a form instead of a PHP-script, e.g.:
http://blah.php?test=750
It returns: $a=2 and $test=750 !
What should I do?
Koos