<?php $queryParamsPath = 'Indoformosa/Folder1/SubFolder1'; $parts = explode('/', $queryParamsPath); $links = []; $path = ''; foreach ($parts as $part) { $links[] = [ 'label' => $part, 'url' => $path . $part, ]; $path .= $part . '/'; } print_r($links);
You have javascript disabled. You will not be able to edit any code.