not sure if this question has a solution, but...
I need to split up a $var. The best way to explain it is to look at this page, the license plate... http://findmytag.com/home/mem.php?mid=3
It needs to be split in half, having the user enter in 2 seperate feilds isn't an option. Some users have 6 digits, some more. spliting it after the 3rd digit would be the best way to go... ie. rather than A04RRU, it should be A04 RRU Thanks for anyone's help & time
$nospaces = preg_replace('/\s/', '', $var); // just in case user entered spaces echo substr($nospaces, 0, 3) . ' ' . substr($nospaces, 3);
lots of ways of doing it,
the way I do it is
$var = A04RRU
$var2 = substr($var, 0, 2) $var3 = substr($var, 2, -1)
and then concatenate them with a space
Thanks for the info, I tried to get google to help but couldn't really get a answer outta it!! Thanks