Snippets tagged "string php" Snippets tagged "string php"

Obtenir un tableau de caractères depuis une chaîne en PHP4

En php5 on a str_split : http://fr.php.net/manual/fr/function.str-split.php

Et en PHP4 :

$chars = preg_split('#(?<=.)(?=.)#s', $string);
by Nicolas Perriault on 2006-10-11, tagged array  php  string 
(3 comments)