Re: please help me I try to post my question to Php.net 2-3 times
| From: | Hugh Danaher | Date: | Thu, 16 Feb 2006 08:32:40 +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-230521@lists.php.net to get a copy of this message | ||
If you want to preserve the blank spaces then try;
str_replace(" ", " ", $contents); // is html for blank space.
HTH
HTD
----- Original Message ----- From: <wvolks@ego.co.th>
To: <php-general@lists.php.net>
Sent: Wednesday, February 15, 2006 10:26 PM
Subject: [PHP] please help me I try to post my question to Php.net 2-3 times
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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.6/257 - Release Date: 2/10/2006-- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.6/257 - Release Date: 2/10/2006