What is the best way to do the following:
I get a path with an AJAX request
e.g. dir1/dir2/dir3/dir4
dir1/dir2/dir3/dir4
I need to present it like this on my we
Something like this maybe (if I got your intention right):
$chunk) { $output[] = sprintf( '%s', implode('/', array_slice($chunks, 0, $i + 1)), $chunk ); } echo implode(' >> ', $output);
Output:
dir1 >> dir2 >> dir3 >> dir4