Im not gonna write the whole function but i can help you in the right way to remove the first 2 chars $text = substr($text, 2, strlen($text)); then you've got to use eregi to split te results and get the text, something like ^([0-9a-zA-Z]){2}^ i know the above version is wrong, it doenst validate that the first char is a number... so you need to create one yourselve. Succes!
This is the shorter way to flatten a array: <?php function array_flatten($a) { foreach($a as $k=>$v) $a[$k]=(array)$v; return call_user_func_array(array_merge,$a); } ?>
$arrayvar = array('test','test1','test2'); //or $arrayvar[] = 'test'; $arrayvar[] = 'test1'; $arrayvar[] = 'test2'; //or $arrayvar[0] = 'test'; $arrayvar[1] = 'test1'; $arrayvar[2] = 'test2'; //or $arrayvar = array(); array_push($arrayvar,'test'); array_push($arrayvar,'test1'); array_push($arrayvar,'test2'); PHP: Peace,