[TYPO3-core] RFC #9779: t3lib_div::trimExplode limit parameter leads to wrong result with non-empty requirement

Xavier Perseguers typo3 at perseguers.ch
Tue Mar 10 16:21:00 CET 2009


> I needed it some days ago in following situation: I have a path, let's say
> 
> $path = 'extension/some/relative/path';
> 
> and I want to extract the name of the extension and get the path:
> 
> $parts = explode('/', $path, 2);
> // $parts[0] => 'extension'
> // $parts[1] => 'some/relative/path';
> 
> very useful indeed!

I forgot to say that this may be used when having something like 
'EXT:extension/some/relative/path/myclass.php' or 
'LLL:EXT:extension/some/relative/path/locallang.xml'

-- 
Xavier Perseguers
http://xavier.perseguers.ch/en/tutorials/typo3.html


More information about the TYPO3-team-core mailing list