Question: I'd like to use this function: 

```
ob_start('no_returns');
 function no_returns($a) { 
  return str_replace(
   array("\r\n","\r","\n","\t",'','',''), 
   '', $a);
 }

```

But when I do, it completely kills Disqus comments so I'd like to ignore the DIV "disqus\_thread". How would I go about doing that without using some heavy search?

Answer: 
If you are looking to speed up the download of the web page, you might try another method:

```
<?php

ob_start('ob_gzhandler');
// html code here

```

This will compress the output in a much more efficient manner and your browser will automatically decompress the output in real-time before the visitor sees it.

A related thread on-line is here: <http://bytes.com/topic/php/answers/621308-compress-html-output-php>

(This is the PHP way to compress web pages without using the webserver configuration. For example apache+gzip/mod\_deflate on apache as mentioned above)
Try [Regular Expression](http://en.wikipedia.org/wiki/Regular_expression) and [preg\_replace](http://php.net/manual/en/function.preg-replace.php)