$string = "hello/world"; $delimiter = "/"; $array = t3lib_div::revExplode($delimiter, $string); // $array is now ["world", "hello"]
$string = "foo/bar/baz"; $delimiter = "/"; $array = t3lib_div::revExplode($delimiter, $string); // $array is now ["baz", "bar", "foo"]In this example, we use t3lib_div revExplode to split the string "foo/bar/baz" using "/" as the delimiter, but in reverse order. The resulting array is ["baz", "bar", "foo"]. The t3lib_div revExplode function is part of the TYPO3 core library.