protected function findValueInArray($searchKey, $valueArray)
    {
        $connection = $this->getConnection();

        // ensure that array is not empty
        if (!count($valueArray)) {
            i5ErrorActivity(I5_ERR_PHP_TYPEPARAM, I5_CAT_PHP, "Array of input values must not be empty", "Array of input values must not be empty");
            return false;
        }

        foreach ($valueArray as $key=>$value) {
            // a match was found!
            if ($key == $searchKey) {
//                $valToLog = (is_array($value)) ? print_r($value, true) : $value;
//                 $connection->logThis("findValueInArray: searchKey: $searchKey. value found: $valToLog");
                return $value;
            }
        }

        // if failed, return null
        // $connection->logThis("findValueInArray: searchKey: $searchKey. no value found");
        return false;
    }
protected function findValueInArray($searchKey, $valueArray)
    {
        $connection = $this->getConnection();

        // ensure that array is not empty
        if (!count($valueArray)) {
            i5ErrorActivity(I5_ERR_PHP_TYPEPARAM, I5_CAT_PHP, "Array of input values must not be empty", "Array of input values must not be empty");
            return false;
        }

        foreach ($valueArray as $key=>$value) {
            // a match was found!
            if ($key == $searchKey) {
//                $valToLog = (is_array($value)) ? print_r($value, true) : $value;
//                 $connection->logThis("findValueInArray: searchKey: $searchKey. value found: $valToLog");
                return $value;
            }
        }

        // if failed, return null
        // $connection->logThis("findValueInArray: searchKey: $searchKey. no value found");
        return false;
    }
protected function findValueInArray ( $ searchKey , $ valueArray ) { $ connection = $ this -> getConnection ( ) ; // ensure that array is not empty if ( ! count ( $ valueArray ) ) { i5ErrorActivity ( I5_ERR_PHP_TYPEPARAM , I5_CAT_PHP , "Array of input values must not be empty" , "Array of input values must not be empty" ) ; return false ; } foreach ( $ valueArray as $ key => $ value ) { // a match was found! if ( $ key == $ searchKey ) { //                $valToLog = (is_array($value)) ? print_r($value, true) : $value; //                 $connection->logThis("findValueInArray: searchKey: $searchKey. value found: $valToLog"); return $ value ; } } // if failed, return null // $connection->logThis("findValueInArray: searchKey: $searchKey. no value found"); return false ; }
Given an array key name, recursively search the input values array
and return the value associated with the key name provided.

@param string $searchKey   key to search for
@return string|array|false  value found in input array for array key. false if failed
Given an array key name recursively search the input values array and return the value associated with the key name provided .