[PHP] Re: PHP: inexplicable behaviour of pre- and post-increment operators

2010-03-01 Thread Martin ZvarĂ­k
Mess Dne 27.2.2010 5:01, clanc...@cybec.com.au napsal(a): A week ago Dasn asked a question about converting arrays, and I quoted one possible way of achieving his task, using the operation: $i = 0; while ($i $k) { $b[$a[$i++]] = $a[$i++]; } I added the comment that I have always been wary

Re: [PHP] inexplicable behaviour

2009-04-27 Thread Simon
If you want to increment $Count by one, you can use any one of the 3 following lines to do this: $Count = $Count + 1; $Count += 1; $Count++; The 3 lines are equivalent, but have varying degrees of elegance (suit yourself). However, make sure that your mysql function returned a number (and not an