note 26867 added to language.operators.comparison
| From: | koos dot vanderkolk at wur dot nl | Date: | Fri, 15 Nov 2002 10:53:47 +0000 |
| Subject: | note 26867 added to language.operators.comparison | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-39528@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
--
http://www.php.net/manual/en/language.operators.comparison.php
http://master.php.net/manage/user-notes.php?action=edit+26867
http://master.php.net/manage/user-notes.php?action=delete+26867
http://master.php.net/manage/user-notes.php?action=reject+26867