String zerlegen in php?

...komplette Frage anzeigen

3 Antworten

$arr = str_split($deinevariable, 3);
$r = int($arr[0]);
$g = int($arr[1]);
$b = int($arr[2]);


str_split(string,length)

in deinem Falle also:

str_split(variable,3)


Was möchtest Du wissen?