spliti

PHP -> Funkcie -> Regulárne výrazy -> spliti

Syntax

array spliti ( string pattern, string string [, int limit] )

Popis

Príkaz jazyka PHP
Split string into array by regular expression case insensitive

This function is identical to split except that this ignores case distinction when matching alphabetic characters.

Príklad

<?php
//This example splits a string using 'a' as the separator:
$string = "aBBBaCCCADDDaEEEaGGGA";
$chunks = spliti ("a", $string, 5);
print_r($chunks);
/*příklad vypíše:
Array
(
  [0] =>
  [1] => BBB
  [2] => CCC
  [3] => DDD
  [4] => EEEaGGGA
)
*/

?>


Pozri aj

preg_split, split, explode, a implode