PHP 8.5.0 Alpha 1 available for testing

Voting

: one plus zero?
(Example: nine)

The Note You're Voting On

m0sh3 at hotmail dot com
18 years ago
Here's how i use it to check if array is associative or not:

<?php

if (array_keys($arr)===range(0, sizeof($arr)-1)) {
// not associative array

} else {
// associative array

}

?>

<< Back to user notes page

To Top