i have a
multi dimensional array with 200 keys and each key have 3 to 5 array ,
So i want to know is there any way to see only limited part ( i.e. upto 3 or 4 keys)
bcoz if i use
print_r($desiredArray); then it toook too much time to print that complete array i want to see only initial 2 or 3 either first two and last two array keys
just like below
$desiredArray $desiredArray ... $desiredArray[199 ] $desiredArray..
if key are not in order then display like below
One possible solution is installing the XDebug extension. With XDebug installed, functions like
var_dump() produce nicely coloured output with protection against recursion, deep nesting or overly long output.
The quick-fix DIY alternative would be:
print_r(array_slice($desiredArray, 0, 4));
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki