[PHP] Re: whitespace...
I'm not sure I fully understand your question, but given the following PHP file: ?php print(hello); #assume there are hundreds of blank lines just above this one. ? all the browse will see is this (minus the dashed lines). -- hello -- On Wed, 4 Sep 2002, Matt Zur wrote: How do I remove the whitespace from a document? I consulted the manual and it said to use the trim function. But in a large PHP document, with lots of fuctions etc in PHP... is there a simple way to compress the whitespace of the entire document? Rather than going through each var and using the trim? Like add a header at the top: ?PHP compresswhitespace() ? If you have a 300k php document, won't the source code reveal (after the browser displays the page) a bunch of whitespace. Doesn't this add to dl time and if so, how do I get rid of it. TIA, -Matt -- Matt Zur [EMAIL PROTECTED] http://www.zurnet.com Need a Web Site??? - Visit... www.zurnet.com 1997 - 2002 - 5th Anniversary!!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: whitespace...
Hi, You should use $content = str_replace( ,,$content); I assume that works, there is probably something better than it too but thats all I see at this hour. -- Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] www.WorldAKT.com - Hébergement de sites Internet Matt Zur [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] How do I remove the whitespace from a document? I consulted the manual and it said to use the trim function. But in a large PHP document, with lots of fuctions etc in PHP... is there a simple way to compress the whitespace of the entire document? Rather than going through each var and using the trim? Like add a header at the top: ?PHP compresswhitespace() ? If you have a 300k php document, won't the source code reveal (after the browser displays the page) a bunch of whitespace. Doesn't this add to dl time and if so, how do I get rid of it. TIA, -Matt -- Matt Zur [EMAIL PROTECTED] http://www.zurnet.com Need a Web Site??? - Visit... www.zurnet.com 1997 - 2002 - 5th Anniversary!!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: whitespace...
If you have a file includes IE: include (data.inc); and have arrays n such with multiple php tags in that file, it will produce alot of white space on the final output. -Matt Philip Hallstrom wrote: I'm not sure I fully understand your question, but given the following PHP file: ?php print(hello); #assume there are hundreds of blank lines just above this one. ? all the browse will see is this (minus the dashed lines). -- hello -- On Wed, 4 Sep 2002, Matt Zur wrote: How do I remove the whitespace from a document? I consulted the manual and it said to use the trim function. But in a large PHP document, with lots of fuctions etc in PHP... is there a simple way to compress the whitespace of the entire document? Rather than going through each var and using the trim? Like add a header at the top: ?PHP compresswhitespace() ? If you have a 300k php document, won't the source code reveal (after the browser displays the page) a bunch of whitespace. Doesn't this add to dl time and if so, how do I get rid of it. TIA, -Matt -- Matt Zur [EMAIL PROTECTED] http://www.zurnet.com Need a Web Site??? - Visit... www.zurnet.com 1997 - 2002 - 5th Anniversary!!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Matt Zur [EMAIL PROTECTED] http://www.zurnet.com Need a Web Site??? - Visit... www.zurnet.com 1997 - 2002 - 5th Anniversary!!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php