<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: 7 PHP functions that saved my life</title>
	<atom:link href="http://imgiseverything.co.uk/2008/01/18/7-php-functions-that-saved-my-life/feed/" rel="self" type="application/rss+xml" />
	<link>http://imgiseverything.co.uk/2008/01/18/7-php-functions-that-saved-my-life/</link>
	<description>Manchester web designer Phil Thompson</description>
	<pubDate>Thu, 04 Dec 2008 03:21:58 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: phil</title>
		<link>http://imgiseverything.co.uk/2008/01/18/7-php-functions-that-saved-my-life/#comment-72887</link>
		<dc:creator>phil</dc:creator>
		<pubDate>Sun, 23 Mar 2008 16:31:44 +0000</pubDate>
		<guid isPermaLink="false">http://imgiseverything.co.uk/2008/01/18/7-php-functions-that-saved-my-life/#comment-72887</guid>
		<description>Alex: too primitive for what? to be useful?</description>
		<content:encoded><![CDATA[<p>Alex: too primitive for what? to be useful?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://imgiseverything.co.uk/2008/01/18/7-php-functions-that-saved-my-life/#comment-72885</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Sun, 23 Mar 2008 16:18:46 +0000</pubDate>
		<guid isPermaLink="false">http://imgiseverything.co.uk/2008/01/18/7-php-functions-that-saved-my-life/#comment-72885</guid>
		<description>i think these are too primitive functions.</description>
		<content:encoded><![CDATA[<p>i think these are too primitive functions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brian</title>
		<link>http://imgiseverything.co.uk/2008/01/18/7-php-functions-that-saved-my-life/#comment-65323</link>
		<dc:creator>brian</dc:creator>
		<pubDate>Fri, 22 Feb 2008 20:49:43 +0000</pubDate>
		<guid isPermaLink="false">http://imgiseverything.co.uk/2008/01/18/7-php-functions-that-saved-my-life/#comment-65323</guid>
		<description>/* I used to be afraid of arrays especially storing form post data into arrays. I whipped up the following fun(ction) to convert my crappy custom strings "arrays" into true arrays.

I would store something like 'eat~more~cheese~please' in my database.

*/

$string = unzip($string,'~');

echo $string[0]; // eat
echo $string[2]; // more
echo $string[3]; // cheese
echo $string[4]; // please

// function below

function unzip($string,$div) { 
$count = 0;
$lengthdiv = strlen($div);
if(substr($string, -strlen($div)) != $div) { $string .= $div;}
while (strpos($string,$div)!=null) {
	$break = strpos($string,$div);
	$unzip[$count] = substr($string, 0, $break);
	$string = substr($string, $break+$lengthdiv);
	$count += 1;
	if($break==strlen($string)){ $unzip[$count] = $string; }	
}
return $unzip;
}</description>
		<content:encoded><![CDATA[<p>/* I used to be afraid of arrays especially storing form post data into arrays. I whipped up the following fun(ction) to convert my crappy custom strings &#8220;arrays&#8221; into true arrays.</p>
<p>I would store something like &#8216;eat~more~cheese~please&#8217; in my database.</p>
<p>*/</p>
<p>$string = unzip($string,&#8217;~');</p>
<p>echo $string[0]; // eat<br />
echo $string[2]; // more<br />
echo $string[3]; // cheese<br />
echo $string[4]; // please</p>
<p>// function below</p>
<p>function unzip($string,$div) {<br />
$count = 0;<br />
$lengthdiv = strlen($div);<br />
if(substr($string, -strlen($div)) != $div) { $string .= $div;}<br />
while (strpos($string,$div)!=null) {<br />
	$break = strpos($string,$div);<br />
	$unzip[$count] = substr($string, 0, $break);<br />
	$string = substr($string, $break+$lengthdiv);<br />
	$count += 1;<br />
	if($break==strlen($string)){ $unzip[$count] = $string; }<br />
}<br />
return $unzip;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: phil</title>
		<link>http://imgiseverything.co.uk/2008/01/18/7-php-functions-that-saved-my-life/#comment-60040</link>
		<dc:creator>phil</dc:creator>
		<pubDate>Thu, 24 Jan 2008 10:42:27 +0000</pubDate>
		<guid isPermaLink="false">http://imgiseverything.co.uk/2008/01/18/7-php-functions-that-saved-my-life/#comment-60040</guid>
		<description>Thanks Draicone but, this post might have lost some of its edge had it been entitled '7 PHP functions, language constructs, general idealisms, and working practices that saved my life'.</description>
		<content:encoded><![CDATA[<p>Thanks Draicone but, this post might have lost some of its edge had it been entitled &#8216;7 PHP functions, language constructs, general idealisms, and working practices that saved my life&#8217;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Draicone</title>
		<link>http://imgiseverything.co.uk/2008/01/18/7-php-functions-that-saved-my-life/#comment-60038</link>
		<dc:creator>Draicone</dc:creator>
		<pubDate>Thu, 24 Jan 2008 10:38:48 +0000</pubDate>
		<guid isPermaLink="false">http://imgiseverything.co.uk/2008/01/18/7-php-functions-that-saved-my-life/#comment-60038</guid>
		<description>As noted in the comments, foreach is a language construct, and certainly isn't just a PHP thing. Isset and exit (also die) are a little dubious, although they are technically language constructs, even though they behave just like any normal function.</description>
		<content:encoded><![CDATA[<p>As noted in the comments, foreach is a language construct, and certainly isn&#8217;t just a PHP thing. Isset and exit (also die) are a little dubious, although they are technically language constructs, even though they behave just like any normal function.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leandro</title>
		<link>http://imgiseverything.co.uk/2008/01/18/7-php-functions-that-saved-my-life/#comment-59850</link>
		<dc:creator>Leandro</dc:creator>
		<pubDate>Wed, 23 Jan 2008 15:13:23 +0000</pubDate>
		<guid isPermaLink="false">http://imgiseverything.co.uk/2008/01/18/7-php-functions-that-saved-my-life/#comment-59850</guid>
		<description>well, there's a &#60;pre&#62; tag inside the ""</description>
		<content:encoded><![CDATA[<p>well, there&#8217;s a &lt;pre&gt; tag inside the &#8220;&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leandro</title>
		<link>http://imgiseverything.co.uk/2008/01/18/7-php-functions-that-saved-my-life/#comment-59844</link>
		<dc:creator>Leandro</dc:creator>
		<pubDate>Wed, 23 Jan 2008 14:41:50 +0000</pubDate>
		<guid isPermaLink="false">http://imgiseverything.co.uk/2008/01/18/7-php-functions-that-saved-my-life/#comment-59844</guid>
		<description>This is really helpful for me:

print "". print_r(get_defined_vars(),true) . "";

Prints all defined variables on php run.</description>
		<content:encoded><![CDATA[<p>This is really helpful for me:</p>
<p>print &#8220;&#8221;. print_r(get_defined_vars(),true) . &#8220;&#8221;;</p>
<p>Prints all defined variables on php run.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sara Golemon</title>
		<link>http://imgiseverything.co.uk/2008/01/18/7-php-functions-that-saved-my-life/#comment-59797</link>
		<dc:creator>Sara Golemon</dc:creator>
		<pubDate>Wed, 23 Jan 2008 09:19:52 +0000</pubDate>
		<guid isPermaLink="false">http://imgiseverything.co.uk/2008/01/18/7-php-functions-that-saved-my-life/#comment-59797</guid>
		<description>If you like number_format(), then you'll LOVE PECL/intl's NumberFormatter class.  All the ease of number_format() with all the localized knowledge of the International Components for Unicode.

http://docs.php.net/manual/en/class.numberformatter.php</description>
		<content:encoded><![CDATA[<p>If you like number_format(), then you&#8217;ll LOVE PECL/intl&#8217;s NumberFormatter class.  All the ease of number_format() with all the localized knowledge of the International Components for Unicode.</p>
<p><a href="http://docs.php.net/manual/en/class.numberformatter.php" rel="nofollow">http://docs.php.net/manual/en/class.numberformatter.php</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Goncalo Fonseca</title>
		<link>http://imgiseverything.co.uk/2008/01/18/7-php-functions-that-saved-my-life/#comment-59752</link>
		<dc:creator>Goncalo Fonseca</dc:creator>
		<pubDate>Wed, 23 Jan 2008 02:34:38 +0000</pubDate>
		<guid isPermaLink="false">http://imgiseverything.co.uk/2008/01/18/7-php-functions-that-saved-my-life/#comment-59752</guid>
		<description>Posts like this one, seem to get back to remind us that you can always improve your code by going back to what is already there, but was long forgotten. Nice ;)</description>
		<content:encoded><![CDATA[<p>Posts like this one, seem to get back to remind us that you can always improve your code by going back to what is already there, but was long forgotten. Nice ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://imgiseverything.co.uk/2008/01/18/7-php-functions-that-saved-my-life/#comment-59714</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Tue, 22 Jan 2008 22:24:23 +0000</pubDate>
		<guid isPermaLink="false">http://imgiseverything.co.uk/2008/01/18/7-php-functions-that-saved-my-life/#comment-59714</guid>
		<description>Thanks for showing your humanness in allowing us to see 'how it was' without all the attitude that so often comes with php 'professionals'.

Steve

Btw, great contributions everyone!</description>
		<content:encoded><![CDATA[<p>Thanks for showing your humanness in allowing us to see &#8216;how it was&#8217; without all the attitude that so often comes with php &#8216;professionals&#8217;.</p>
<p>Steve</p>
<p>Btw, great contributions everyone!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
