<?php $commands = "[CMD1,[CMD2],[CMD3,[CMD4],[CMD5]]]"; if (preg_match_all('/[^][,]+/', $commands, $matches)) { $array = $matches[0]; rsort($array); print_r($array); }
You have javascript disabled. You will not be able to edit any code.