Results 1 to 25 of 186
Thread: PHP and MySQL coding tips
Apr 2, 2002, 00:59 #14
- Join Date
- Dec 2001
- 0 Post(s)
- 0 Thread(s)
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.
for ($i = '0'; $i < count($_POST); $i++)
$key = array_search('on', $_POST);
$_POST[$key] = 'Yes';
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.U.S. DoD Member in Japan?
Choose your base. Buy|Sell. Easy @ APO Ads.