<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Vijaya Kumar Blog &#187; fill number</title>
	<atom:link href="http://vijayakumar.org/tag/fill-number/feed" rel="self" type="application/rss+xml" />
	<link>http://vijayakumar.org</link>
	<description>(Stunning PHP/MYSQL/AJAX/SEO Tips)</description>
	<lastBuildDate>Fri, 03 Sep 2010 02:06:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Zero fill a number using PHP</title>
		<link>http://vijayakumar.org/zero-fill-a-number-using-php.html</link>
		<comments>http://vijayakumar.org/zero-fill-a-number-using-php.html#comments</comments>
		<pubDate>Sun, 02 Aug 2009 00:47:15 +0000</pubDate>
		<dc:creator>Vijaya Kumar</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[fill number]]></category>
		<category><![CDATA[Fill the integers with 0]]></category>
		<category><![CDATA[Zero fill a number using PHP]]></category>

		<guid isPermaLink="false">http://www.vijayakumar.org/?p=422</guid>
		<description><![CDATA[Have you ever needed to make sure your number is a certain length for output? Say you have the number 6 but need to make sure it is 4 digits and out put like: 0006. How would you go about this? One way to do this is the following: &#60;?php function zerofill ($num,$zerofill) { while [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever needed to make sure your number is a certain length for output? Say you have the number 6 but need to make sure it is 4 digits and out put like: 0006. How would you go about this? One way to do this is the following:</p>
<p><code>&lt;?php</code><br />
<code>function zerofill ($num,$zerofill) {</code><br />
<code>while (strlen($num)&lt;$zerofill) {</code><br />
<code>$num = "0".$num;</code><br />
<code>}</code><br />
<code>return $num;<br />
} </code><br />
<code>?&gt;</code></p>
<p>The usage of this code would be:</p>
<p><code>&lt;?php echo zerofill(6, 7); ?&gt;</code></p>
<p>Output will be 00006</p>
<p>Keep Enjoying..</p>
]]></content:encoded>
			<wfw:commentRss>http://vijayakumar.org/zero-fill-a-number-using-php.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
