Some sweeping syntax changes for consistency:

(! foo) changed to ( ! foo)
|| changed to OR
changed newline standardization code in various places from preg_replace to str_replace
diff --git a/user_guide/general/creating_libraries.html b/user_guide/general/creating_libraries.html
index c2c600e..c131870 100644
--- a/user_guide/general/creating_libraries.html
+++ b/user_guide/general/creating_libraries.html
@@ -98,7 +98,7 @@
 

 <p>Classes should have this basic prototype (Note:  We are using the name <kbd>Someclass</kbd> purely as an example):</p>

 

-<code>&lt;?php  if (!defined('BASEPATH')) exit('No direct script access allowed');

+<code>&lt;?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

 <br /><br />

 class Someclass {<br />

 <br />

@@ -137,7 +137,7 @@
 

 <p>If you use this feature you must set up your class constructor to expect data:</p>

 

-<code>&lt;?php  if (!defined('BASEPATH')) exit('No direct script access allowed');<br />

+<code>&lt;?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');<br />

 <br />

 class Someclass {<br />

 <br />

diff --git a/user_guide/helpers/file_helper.html b/user_guide/helpers/file_helper.html
index 13d0beb..2c3dba1 100644
--- a/user_guide/helpers/file_helper.html
+++ b/user_guide/helpers/file_helper.html
@@ -88,7 +88,7 @@
 <code>

 $data = 'Some file data';<br />

 <br />

-if (! write_file('./path/to/file.php', $data))<br />

+if ( ! write_file('./path/to/file.php', $data))<br />

 {<br />

 &nbsp;&nbsp;&nbsp;&nbsp; echo 'Unable to write the file';<br />

 }<br />

diff --git a/user_guide/libraries/email.html b/user_guide/libraries/email.html
index bc6bd9d..d4990df 100644
--- a/user_guide/libraries/email.html
+++ b/user_guide/libraries/email.html
@@ -250,7 +250,7 @@
 <p>The Email sending function. Returns boolean TRUE or FALSE based on success or failure, enabling it to be used

 conditionally:</p>

 

-<code>if (! $this->email->send())<br />

+<code>if ( ! $this->email->send())<br />

 {<br />

 &nbsp;&nbsp;&nbsp;&nbsp;// Generate error<br />

 }</code>

diff --git a/user_guide/libraries/encryption.html b/user_guide/libraries/encryption.html
index c8773f2..25cb515 100644
--- a/user_guide/libraries/encryption.html
+++ b/user_guide/libraries/encryption.html
@@ -140,7 +140,7 @@
 <p>Please visit php.net for a list of  <a href="http://php.net/mcrypt">available ciphers</a>.</p>

 

 <p>If you'd like to manually test whether your server supports Mcrypt you can use:</p>

-<code>echo (! function_exists('mcrypt_encrypt')) ? 'Nope' : 'Yup';</code>

+<code>echo ( ! function_exists('mcrypt_encrypt')) ? 'Nope' : 'Yup';</code>

 

 

 <h2>$this->encrypt->set_mode();</h2>

diff --git a/user_guide/libraries/file_uploading.html b/user_guide/libraries/file_uploading.html
index 6e0d10f..2778781 100644
--- a/user_guide/libraries/file_uploading.html
+++ b/user_guide/libraries/file_uploading.html
@@ -167,7 +167,7 @@
 		

 		$this->load->library('upload', $config);

 	

-		if (! $this->upload->do_upload())

+		if ( ! $this->upload->do_upload())

 		{

 			$error = array('error' => $this->upload->display_errors());

 			

diff --git a/user_guide/libraries/image_lib.html b/user_guide/libraries/image_lib.html
index f905b88..8fd7513 100644
--- a/user_guide/libraries/image_lib.html
+++ b/user_guide/libraries/image_lib.html
@@ -132,7 +132,7 @@
 

 <p>A good practice is use the processing function conditionally, showing an error upon failure, like this:</p>

 

-<code>if (! $this->image_lib->resize())<br />

+<code>if ( ! $this->image_lib->resize())<br />

 {<br />

 &nbsp;&nbsp;&nbsp;&nbsp;echo $this->image_lib->display_errors();<br />

 }</code>

@@ -370,7 +370,7 @@
 $this->image_lib->initialize($config);

 <br />

 <br />

-if (! $this->image_lib->crop())<br />

+if ( ! $this->image_lib->crop())<br />

 {<br />

 &nbsp;&nbsp;&nbsp;&nbsp;echo $this->image_lib->display_errors();<br />

 }</code>

@@ -407,7 +407,7 @@
 $this->image_lib->initialize($config);

 <br />

 <br />

-if (! $this->image_lib->rotate())<br />

+if ( ! $this->image_lib->rotate())<br />

 {<br />

 &nbsp;&nbsp;&nbsp;&nbsp;echo $this->image_lib->display_errors();<br />

 }</code>

diff --git a/user_guide/libraries/input.html b/user_guide/libraries/input.html
index 311dab8..17ed7f0 100644
--- a/user_guide/libraries/input.html
+++ b/user_guide/libraries/input.html
@@ -120,7 +120,7 @@
 In other words, normally you might do something like this:</p>

 

 <code>

-if (! isset($_POST['something']))<br />

+if ( ! isset($_POST['something']))<br />

 {<br />

 &nbsp;&nbsp;&nbsp;&nbsp;$something = FALSE;<br />

 }<br />

@@ -178,7 +178,7 @@
 <p>Takes an IP address as input and returns TRUE or FALSE (boolean) if it is valid or not.  Note:  The $this->input->ip_address() function above

 validates the IP automatically.</p>

 

-<code>if (! $this-&gt;input-&gt;valid_ip($ip))<br />

+<code>if ( ! $this-&gt;input-&gt;valid_ip($ip))<br />

 {<br />

 &nbsp;&nbsp;&nbsp;&nbsp; echo 'Not Valid';<br />

 }<br />

diff --git a/user_guide/libraries/trackback.html b/user_guide/libraries/trackback.html
index 02c8852..f86ccca 100644
--- a/user_guide/libraries/trackback.html
+++ b/user_guide/libraries/trackback.html
@@ -86,7 +86,7 @@
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'charset'&nbsp;&nbsp;&nbsp;=> 'utf-8'<br />

 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;);<br />

 <br />

-if (! $this->trackback->send($tb_data))<br />

+if ( ! $this->trackback->send($tb_data))<br />

 {<br />

 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo $this->trackback->display_errors();<br />

 }<br />

@@ -173,7 +173,7 @@
 &nbsp;&nbsp;&nbsp;&nbsp;$this->trackback->send_error("Unable to determine the entry ID");<br />

 }<br />

 <br />

-if (! $this->trackback->receive())<br />

+if ( ! $this->trackback->receive())<br />

 {<br />

 &nbsp;&nbsp;&nbsp;&nbsp;$this->trackback->send_error("The Trackback did not contain valid data");<br />

 }<br />

diff --git a/user_guide/libraries/xmlrpc.html b/user_guide/libraries/xmlrpc.html
index b7e98f6..24bbf40 100644
--- a/user_guide/libraries/xmlrpc.html
+++ b/user_guide/libraries/xmlrpc.html
@@ -120,7 +120,7 @@
 $request = array('My Photoblog', 'http://www.my-site.com/photoblog/');<br />

 $this->xmlrpc->request($request);<br />

 <br />

-if (! $this->xmlrpc->send_request())<br />

+if ( ! $this->xmlrpc->send_request())<br />

 {<br />

 &nbsp;&nbsp;&nbsp;&nbsp;echo $this-&gt;xmlrpc->display_error();<br />

 }</code>

@@ -336,7 +336,7 @@
 		$request = array('How is it going?');

 		$this->xmlrpc->request($request);	

 		

-		if (! $this->xmlrpc->send_request())

+		if ( ! $this->xmlrpc->send_request())

 		{

 			echo $this->xmlrpc->display_error();

 		}