I was wondering if there is a way to print just the structure of the array without the contents. I generally use print_r to examine the structure but because my array contains some binary data, I'd rather not use this.
<?php
function print_no_contents($arr) {
foreach ($arr as $k=>$v) {
echo $k."=> ";
if (is_array($v)) {
echo "\n";
print_no_contents($v);
}
else echo "[data]";
echo "\n";
}
}
?>
*didn't test this, but should get you started.
couldnt you just do
foreach ($array as $structure=>$data){
echo $structure."=><br />";
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With