[Pmwiki-users] Some issues with the latest pmwiki release
Patrick R. Michaud
pmichaud at sci.tamucc.edu
Tue Apr 29 11:18:04 CDT 2003
On Tue, 29 Apr 2003, Jonathan Scott Duff wrote:
> But "11.1" doesn't come before "2.5" when you ksort() an array. And I
> don't think you need to explain the difference between $array[1.2] and
> $array["1.2"]; just tell them to always use quotes "so that everything
> works correctly" (except maybe use more words :) and leave the
> explanation to the PHP folks.
Perhaps. On the other hand, people intuitively understand integers.
Strings don't always work the way you expect. For example, I just did
a ksort test with various number and string combinations and ended up with a
key sequence of 7.1, 11.1, 11.1a, 7.1a, 70.0, and 70. Worse, I did
ksort($a);
print_r($a);
ksort($a);
print_r($a);
and ended up with different results for the output:
Array
(
[7.1] => 10
[11.1] => 11
[11.1a] => 9
[7.1a] => 8
[70.0] => 4
[70] => 7
)
Array
(
[11.1] => 11
[11.1a] => 9
[7.1] => 10
[7.1a] => 8
[70] => 7
[70.0] => 4
)
Pm
More information about the pmwiki-users
mailing list