Voting

: min(eight, seven)?
(Example: nine)

The Note You're Voting On

smilingrasta
18 years ago
This function tends to reindex arrays, which is not mentioned in the function description.

I just tried to run that function on a three dimensional array, containing errormessages.
The first dim. contains the severity of the error ('warn', 'crit') the second dim the linenumber (numerical) and the third one consists of errormessages

<?php
# Array printout:
Array
(
[
warn] => Array // severity (associative)
(
[
2] => Array // linenumber (numerical)
(
[
0] => "Category does not exist"
[1] => "Manufacturer does not exist"
)
)
)

?>

If i now merge two or more of those arrays using array_merge_recursive(), the linenumbers are not conserved. Instead of, they are all renumbered, starting with 0.

Just thought anyone may want to know about that. :)
regards, smilingrasta

<< Back to user notes page

To Top