The code you pasted here looks to be missing some line breaks, which may be an indication that the editor you used is not saving it as plain text. It should normally look something like this:
PHP Code:
<?php
if(!defined('CORE'))
exit(0);
function jspack(&$s){
$s = preg_replace(array('/\r\n/s','/\n/s'),'',$s);
}
?>
Also, while I believe that if() condition will work as intended written that way, I find that for consistency and clarity, it's better to always use the curly braces around what is to be executed, even if it's only one line:
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Bookmarks