[Typo3-dev] Splitting array acording to alphabet

Arne Skjaerholt skjaerho at cpi.no
Fri Jun 17 10:53:10 CEST 2005


If you want just the names beginning with a character this should do it:
$names = preg_grep ( '/$character/i', $lastnames );
To get the names from $start to $end (both being single characters) do
this: $names = preg_grep ( '/[$start-$end]/i', $last_names );

Arne
:wq





More information about the TYPO3-dev mailing list