Warning ! Don't add one to your key ($j++) in this case. The "count()"
method count ( :) ) return the number of existing keys in the $chk
array. You'll make hole in your array if you do this :

$arr[0] = "toto";

count($arr) => 1;

$arr[1] = "tata";

count($arr) => 2;

$arr[count[$arr]++] = "titi"; => $arr(0=>toto, 1=>tata, 3=>titi) (no
2=>)

Prefer array_push($arr, ...)

Cordialement,
Jean-Philippe BENARD
Consultant STERIA Infogérance
([EMAIL PROTECTED])


Thanks for catching that Jean

:| damn I hate monday mornings

Reply via email to