[Typo3-dev] RFC: t3lib_div suggestion

Franz Holzinger franz at fholzinger.com
Wed Mar 30 10:23:32 CEST 2005


Kraft Bernhard wrote:
> At the moment the functions makes strange things if called with 
> arguments where
> values are negative (which is normally allowed with the php array 
> functions and makes
> sensefull things) or when start2 is smaller than start1+length1 ....
> 
> 
> Comments ?
> 
This is nearly the same as
array_splice ($array, $offset, $length, $replacementarray),

$replacementarray1[] = $entries[2];
$replacementarray2[] = $entries[1];
$entries = array_splice($entries, 1, 1, $replacementarray1);
$entries = array_splice($entries, 2, 1, $replacementarray2);

You can put an if-Statement in the front of the function to change the 
parameters and not to allow start2 being smaller than start1+length1.

Regards,
Franz




More information about the TYPO3-dev mailing list