nope -- I want to completely suppress any extraneous white space characters
(tabs, spaces, etc.) in the HTML as it's being delivered to the client.  So,
where your source file might look like:

<table>
      <tr>
          <td>
          Hello World!
          </td>
      <tr>
</table>

The client will receive the HTML as:

<table><tr><td>Hello World!</td></tr></table>

all on one big long line.  But your source file maintains the original
formatting for easy readability.

I'm guessing the answer is no, PHP can't (easily) do this but I just thought
I'd check.

--kurt
----- Original Message -----
From: "Mukul Sabharwal" <[EMAIL PROTECTED]>
To: "Kurt Lieber" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, July 09, 2001 10:04 PM
Subject: Re: [PHP] stripping white space?


> Hi,
>
> I take that you simply want to remove ALL whitespaces
> from a data block (variable).
>
> you could simply use str_replace(" ", "", $var);
>
>
>
> --- Kurt Lieber <[EMAIL PROTECTED]> wrote:
> > Is there a way using PHP to easily strip white space
> > out of an html page as
> > it's being sent to the client.  That is to say, the
> > page that we as
> > developers work on is nicely formatted, indented,
> > etc. but when it's sent
> > out to the client, PHP will remove all the extra
> > white space both to
> > obfuscate the code and reduce the size a bit.
> >
> > For anyone who knows Cold Fusion, I'm looking for
> > the PHP equivalent of the
> > "Suppress whitespace by default" option in the Cold
> > Fusion Server
> > Administrator.
> >
> > (NOTE: I'm not looking for a discussion on the
> > merits of stripping vs. not
> > stripping white space characters or whether or not
> > it really does any
> > good -- I just want to know if it can be done easily
> > using PHP)
> >
> > Thanks.
> >
> > --kurt
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> >
>
>
> =====
> *********************************
> http://www.geocities.com/mimodit
> *********************************
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail
> http://personal.mail.yahoo.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to