src/PrintKeyValue.php
/**
     * Gets a string representation of a key-value pair of an array
     * @param array $d
     * @param int $level
     * @return string
     */
Gets a string representation of a key-value pair of an array
@param array $d
@param int $level
@return string
Gets a string representation of a key - value pair of an array @param array $d @param int $level @return string
public function printKeyValues(array $d, $level = 0)
    {
        foreach ($d as $key => $value) {
            if (!is_array($value)) {
                $this->printLn($key . $this->keyValMiddle . $value, $level);
            } else {
                $this->printLn($key . $this->keyValMiddle . $this->openBracket, $level);
                $level++;
                $this->printKeyValues($value, $level);
                $level--;
                $this->printLn($this->closeBracket, $level);
            }
        }
        return $this->out;
    }
public function printKeyValues ( array $ d , $ level = 0 ) { foreach ( $ d as $ key => $ value ) { if ( ! is_array ( $ value ) ) { $ this -> printLn ( $ key . $ this -> keyValMiddle . $ value , $ level ) ; } else { $ this -> printLn ( $ key . $ this -> keyValMiddle . $ this -> openBracket , $ level ) ; $ level ++ ; $ this -> printKeyValues ( $ value , $ level ) ; $ level -- ; $ this -> printLn ( $ this -> closeBracket , $ level ) ; } } return $ this -> out ; }
Gets a string representation of a key-value pair of an array
 @param array $d
 @param int $level
 @return string
Gets a string representation of a key - value pair of an array @param array $d @param int $level @return string