- var_dump: documentation ( source)
- json_decode: documentation ( source)
<?php
echo __DIR__;
$content = 'fdsfgh'; //isset($data['items']) ? $data['items'] : $value['items'];
$isPlain = false;
if (!is_array($content)) {
$dataArr = json_decode($content, true);
$content = (null === $dataArr) ? array($content) : $dataArr;
$isPlain = true;
}
var_dump( $content);