Hi, > Ah, so it's not 50 space padding but columns at 50 characters, > space-padded? > > In that case, just use substr(). > > $var1 = substr($string, 0, 50); > $var2 = substr($string, 50, 50); > $var3 = substr($string, 100, 50); > > And then trim() if needed > > Of course, what it sounds like you really want is a file that is > formatted to > proper CSV in the first place so that you can use fgetcsv(). > Brilliant! Works fab ... thank you ... The file will always be the same format etc - so I this is brilliant... Ta Steven -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php