University of Oregon

Edit CSS and removing line breaks to process through js

I wanted to append the head of a doc with some styles but I didn’t want any line breaks.
So I used this function:

<?php
function removeLB($content){
	$content = str_replace(chr(10), " ", $content); //remove carriage returns
	$content = str_replace(chr(13), " ", $content); //remove carriage returns
	return $content;
}

That way I could edit with line breaks but send it through the jQuery append without.
(more…)

cfsavecontent cross platform: Here_document

I’d forgotten all about EOF in php and I was looking for an alternative to ob_start tags.
Thanks to Stephen I’m back on track.

http://en.wikipedia.org/wiki/Here_document (more…)