1 <?php
2
3 namespace PayPal\Common;
4
5 /**
6 * Class ArrayUtil
7 * Util Class for Arrays
8 *
9 * @package PayPal\Common
10 */
11 class ArrayUtil
12 {
13 /**
14 *
15 * @param array $arr
16 * @return true if $arr is an associative array
17 */
18 public static function isAssocArray(array $arr)
19 {
20 foreach ($arr as $k => $v) {
21 if (is_int($k)) {
22 return false;
23 }
24 }
25 return true;
26 }
27 }
28