Your right. Guess I better redeem myself by writing it here the way I actually use it.

I use it to change the value of a specific key inside the $_POST array before entering it into mySQL.

PHP Code:
for ($i '0'$i count($_POST); $i++)
$key array_search('on'$_POST);
$_POST[$key] = 'Yes';

This bit of code will change any $_POST array variable (is that the right way to explain that?) with a value of 'on' to 'Yes'. I did this because checkboxes return "on" when they are checked, and I wanted "Yes" to be in the database, not "on".

After thinking about it, this bit of code would work only as a way to change every key with a specific value to another value... So disregard my bit of code for echoing!!.

Well, my point was that you can't loop through the $_POST array using a number for the key (at least, it wasn't working for me).

BTW, foreach is a loop.