preg_grep bug?!?

From: Date: Mon, 19 Mar 2001 15:15:40 +0000
Subject: preg_grep bug?!?
Groups: php.dev 
Request: Send a blank email to php-dev+get-49349@lists.php.net to get a copy of this message
Hello ppl, I have a dropdown menu which lists some countries. These countries are also in a database and each of them have an ID number used for control. Well, when I insert an entry for each of the countries in the database, the next time I click on the dropdown this country must not appear again. For this, I use preg_grep($country, $country_list) where $country is the current country code and $country_list is the array of already known country codes. The problem is(I'm gonna show it by the country codes): I have 1, 2, 3, 4...12 countries Then I insert firstly the 12th. When the script executes the preg_grep next time I'll get 3, 4...11. Well, it kicked away my 1 and 2 just because of 12. Is this a normal behavior??? Sorry for the dazed text and thanx, William

« previous php.dev (#49349) next »