Jump to content

Recommended Posts

here is the challenge i am facing.i have a field that contains integers ranging from 1 to 10.how can i pull and display in a select menu numbers that are not yet in the field.i was thinking of creating an array of numbers that range (1-10) then compare with the numbers within the field but i am somehow failing to have the comparison work.. >:( >:( :'(     

$arr=array(1,2,3,4,5,6,7);

foreach($find as $test ){

if(in_array($test['rank'],$arr)){
echo "NUMBER  ... is present";
}
else{
	echo "TESTTTTTTTTT";
	}

}

 

whats my challenge?i would like it to show me the numbers that are not in the field 'rank' and this actually will be in a select menu so that a user select any of the non used number. 

 

 

Link to comment
https://forums.phpfreaks.com/topic/175792-retrieve-used-numbers/
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.