----- Original Message ----- 
From: "Wade Smart"

02052008 1840 GMT-6

A piece of hardware puts out a formatted report daily that I need to
extract the data from. There are 13 columns of information. The data in
the columns are from 1 to 5 possibly 6 places with no 0's as place holders.

What I need to do is remove all the spaces except 1 between all the
columns.

I thought about doing something like:


do{ $pos_start = $pos_start + 1; }
while ( !chr(32);

But that doesnt work.

Would someone give me a suggestion.

Wade
------------------------------
A correction to my last post -

$tmp = str_replace('   ', ' # ', $text);
the above will not match a space in the last colmn, best to use -
$tmp = str_replace('  ', ' #', $text);

Also REGEX loads a large payload so I generally don't load it (use it) 
unless I am doing a lot of REGEX.
str_replace is much faster 

Reply via email to