public static function EasyRdf_Utils::isAssociativeArray

Check if something is an associative array

Note: this method only checks the key of the first value in the array.

Parameters

mixed $param The variable to check:

Return value

bool true if the variable is an associative array

1 call to EasyRdf_Utils::isAssociativeArray()
EasyRdf_Literal::create in drupal/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Literal.php
Create a new literal object

File

drupal/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Utils.php, line 79

Class

EasyRdf_Utils
Class containing static utility functions

Code

public static function isAssociativeArray($param) {
  if (is_array($param)) {
    $keys = array_keys($param);
    if ($keys[0] === 0) {
      return false;
    }
    else {
      return true;
    }
  }
  else {
    return false;
  }
}