public static function getReadableArrayContents($sKey, $vValue, $sLabelCharLengths = 16, $iOffset = 0)
{
$_aOutput = array();
$_aOutput[] = ($iOffset ? str_pad(' ', $iOffset) : '') . ($sKey ? '[' . $sKey . ']' : '');
if (!in_array(gettype($vValue), array('array', 'object'))) {
$_aOutput[] = $vValue;
return implode(PHP_EOL, $_aOutput);
}
foreach ($vValue as $_sTitle => $_asDescription) {
if (!in_array(gettype($_asDescription), array('array', 'object'))) {
$_aOutput[] = str_pad(' ', $iOffset) . $_sTitle . str_pad(':', $sLabelCharLengths - self::getStringLength($_sTitle)) . $_asDescription;
continue;
}
$_aOutput[] = str_pad(' ', $iOffset) . $_sTitle . ": {" . self::getReadableArrayContents('', $_asDescription, 16, $iOffset + 4) . PHP_EOL . str_pad(' ', $iOffset) . "}";
}
return implode(PHP_EOL, $_aOutput);
}