forked from LiveCarta/PayPal-PHP-SDK
Initial commit
This commit is contained in:
19
lib/PayPal/Common/ArrayUtil.php
Normal file
19
lib/PayPal/Common/ArrayUtil.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
namespace PayPal\Common;
|
||||
|
||||
class ArrayUtil {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param array $arr
|
||||
* @return true if $arr is an associative array
|
||||
*/
|
||||
public static function isAssocArray(array $arr) {
|
||||
foreach($arr as $k => $v) {
|
||||
if(is_int($k)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user