Re: please help me I try to post my question to Php.net 2-3 times

From: Date: Thu, 16 Feb 2006 08:21:15 +0000
Subject: Re: please help me I try to post my question to Php.net 2-3 times
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-230520@lists.php.net to get a copy of this message
wvolks@ego.co.th wrote:
text file problem read text file to array string. I use function File(). but when I display data in text file it compress space in each lines such as first record contain "1_____2______3______4______" ( _ = blank ) when store in array string is "1 2 3 4" . I want you tell me howto do? +++++++++++++++++++++++++++++++++++++++++ <?php $filename = "c:data.txt"; $contents = file($filename); echo $contents; ?> // data in text file is "1_____2_____3_____4" < _ = blank> // output is "1 2 3 4" // I want fixed possition . please help me ? from Wvolks
is it just "whitespace" or are there also commands in it like \t or \r ? Otherwise just replace the whitespace with "" like $filename = "c:data.txt"; str_replace(" ", "", $contents); echo $contents; Something like that? -- Smileys rule (cX.x)C --o(^_^o) Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

« previous php.general (#230520) next »