<?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>Adityon &#187; PHP</title>
	<atom:link href="http://blog.adityon.com/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.adityon.com</link>
	<description>Simpler solution for complex problem. Think different - Keshav Shetty</description>
	<lastBuildDate>Sat, 04 Jun 2011 17:32:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>PHP Chapter 1 &#8211; Variables and Operators</title>
		<link>http://blog.adityon.com/2009/11/php-chapter-1-variables-and-operators/</link>
		<comments>http://blog.adityon.com/2009/11/php-chapter-1-variables-and-operators/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 17:50:00 +0000</pubDate>
		<dc:creator>Keshav Shetty</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.adityon.com/2009/11/php-chapter-1-variables-and-operators/</guid>
		<description><![CDATA[In web development using PHP, it is normal practice to include php codes into html using special tag &#8220;&#60;?php&#8221; e.g:
&#60;html&#62;
&#60;head&#62;&#60;/head&#62;
&#60;body&#62;
&#60;?php echo &#8216;Wlecome to php&#8217;; ?&#62;
&#60;/body&#62;
&#60;/html&#62;
When this file is requested by the browser an web aware server recognizes &#8220;&#60;?php&#8221; tag and understands that it needs to be interpreted by php, so it will pass it to php interprester,
php interpretor will execute and translates all php code and generates resuting html back to web server. Web server will combine the static html and php interprested html and serves the client.
So you might ...]]></description>
			<content:encoded><![CDATA[<p>In web development using PHP, it is normal practice to include php codes into html using special tag &#8220;&lt;?php&#8221; e.g:</p>
<p>&lt;html&gt;</p>
<p>&lt;head&gt;&lt;/head&gt;</p>
<p>&lt;body&gt;</p>
<p>&lt;?php echo &#8216;Wlecome to php&#8217;; ?&gt;</p>
<p>&lt;/body&gt;</p>
<p>&lt;/html&gt;</p>
<p>When this file is requested by the browser an web aware server recognizes &#8220;&lt;?php&#8221; tag and understands that it needs to be interpreted by php, so it will pass it to php interprester,</p>
<p>php interpretor will execute and translates all php code and generates resuting html back to web server. Web server will combine the static html and php interprested html and serves the client.</p>
<p>So you might have understood that we can embed all dynamic contents using &lt;?php tag inside a html code. You might have observed everything is processed at server side and only resulting html is served to the browser, in this sence php is more secured and superior to other scripting language like javascript which is a client side scripting.</p>
<p>Note the following during your development</p>
<ol>
<li>All php code blocks should start with special php tag i.e &#8220;&lt;?php&#8221; and ends with ?&gt;</li>
<li>Everyline of php should terminate with ; (Optional for last line of php block)</li>
<li>Php supports escape characters so that interprester will not intefere in the output. e.g: You want to display a new line between two lines then you can use \n i.e &lt;?php echo &#8220;first line \n second line&#8221;; ?&gt;</li>
<li>There are other escape character like \t (for tab), \r (carriage return), \&#8217; (single quatation mark), \&#8221; (double quatation mark), \\ (a backspace)</li>
<li>&lt;? php echo &#8216;test line&#8217;; ?&gt; and &lt;?php echo &#8220;test line&#8221;; ?&gt; both are same, however when there is a escape character then you need to use &#8220;(double quote)</li>
</ol>
<p><span style="TEXT-DECORATION: none"><strong>Variable and operator</strong> <a href="http://www.php.net/manual/en/language.variables.php" target="_blank">(For more details refer php.net dicument)</a></span></p>
<p>Lets start with basic feature of php i.e Variable and operator (almost any language)</p>
<p>A php variable <strong>should</strong> start with $ symbol and must begin with letter or underscore. e.g: $var1, $_number are valid variables. <strong>(php variables are case sensitive)</strong></p>
<p>Inside a html code you can use variable as below</p>
<p style="TEXT-ALIGN: left"><span style="FONT-FAMILY: Courier; FONT-SIZE: 0.6em"><span style="FONT-FAMILY: Courier; FONT-SIZE: 0.6em">&lt;?php</span></span></p>
<p style="TEXT-ALIGN: left">$name = &#8216;Keshav&#8217;;</p>
<p style="TEXT-ALIGN: left">?&gt;</p>
<p>&lt;h2&gt;Good work &lt;?php echo $name; ?&gt;&lt;/h2&gt;</p>
<p>This will out put &#8220;Good work Keshav&#8221; in your browser.</p>
<p>Another example below to demonstrate numerical values in variables.</p>
<p>Lets add two numbers 2 and 3</p>
<p>&lt;?php</p>
<p>$number1 = 2;</p>
<p>$number2 = 3;</p>
<p>$result = $number1 + $number2;</p>
<p>?&gt;</p>
<p>&lt;h2&gt;Result is &lt;?php echo $result; ?&gt;&lt;/h2&gt;</p>
<p>or previous line can be replaced with</p>
<p>&lt;h2&gt;&lt;?php echo &#8220;Result is $result&#8221;; ?&gt;&lt;/h2&gt; (i.e you can use variables inside &#8221; (double quotes)</p>
<p>Below example demonstrate about dynamic variable names use i.e variable name itself is a variable.</p>
<p style="TEXT-ALIGN: left"><span style="FONT-FAMILY: Courier; FONT-SIZE: 0.6em"><span style="FONT-FAMILY: Courier; FONT-SIZE: 0.6em">&lt;?php</span></span></p>
<p style="TEXT-ALIGN: left">$anAttribute = &#8216;rate&#8217;;</p>
<p style="TEXT-ALIGN: left">${$anAttribute} = 20;</p>
<p style="TEXT-ALIGN: left">echo $rate;</p>
<p>?&gt;</p>
<p>To remove (destroy) the variable use <span style="FONT-FAMILY: Courier; FONT-SIZE: 0.6em"><span style="FONT-FAMILY: Courier; FONT-SIZE: 0.6em">unset function call</span></span></p>
<p><span style="FONT-FAMILY: Courier; FONT-SIZE: 0.6em"><span style="FONT-FAMILY: Courier; FONT-SIZE: 0.6em">e.g:</span></span> <span style="FONT-FAMILY: Courier; FONT-SIZE: 0.6em"><span style="FONT-FAMILY: Courier; FONT-SIZE: 0.6em">&lt;?php</span></span></p>
<p><span style="FONT-FAMILY: Courier; FONT-SIZE: 0.6em"><span style="FONT-FAMILY: Courier; FONT-SIZE: 0.6em">$name = &#8216;Keshav&#8217;;</span></span></p>
<p style="TEXT-ALIGN: left">?&gt;</p>
<p>&lt;h2&gt;First time printing name &lt;?php echo $name; ?&gt;&lt;/h2&gt;</p>
<p>&lt;?php <span style="FONT-FAMILY: Courier; FONT-SIZE: 0.6em"><span style="FONT-FAMILY: Courier; FONT-SIZE: 0.6em">unset($name) ;</span></span> ?&gt;</p>
<p style="TEXT-ALIGN: left">&lt;h2&gt;After unset() printing name &lt;?php echo $name; ?&gt;&lt;/h2&gt;</p>
<p style="TEXT-ALIGN: left">The second line should generate an error, because after unset variable no more exist and available for use inside php code.</p>
<p style="TEXT-ALIGN: left">
<p style="TEXT-ALIGN: left">You can use null as assign value to a variable e.g: &lt;?php $name = null; ?&gt;</p>
<p>To inspect the conetent of variable use var_dump() function, e.g:</p>
<p style="TEXT-ALIGN: left"><span style="FONT-FAMILY: Courier; FONT-SIZE: 0.6em">&lt;?php</span></p>
<p style="TEXT-ALIGN: left">$name = &#8216;Keshav&#8217;;</p>
<p style="TEXT-ALIGN: left">$price = 30;</p>
<p style="TEXT-ALIGN: left">var_dump($name);</p>
<p style="TEXT-ALIGN: left">var_dump($price);</p>
<p>?&gt;</p>
<p>Alternatively you can use print_r() function to achive the same, but with less information.</p>
<p>php variable types (For detailed info refer <a href="http://www.php.net/manual/en/language.types.php" target="_blank">php.net site</a>)</p>
<p>&lt;?php</p>
<p>// Boolean type (takes only true or false)</p>
<p>$isValidData = true;</p>
<p>// Integer</p>
<p>$length = 15;</p>
<p>// Floating point</p>
<p>$temperature = 98.6;</p>
<p>// string</p>
<p>$name = &#8216;Keshav&#8217;;</p>
<p>// null or empty</p>
<p>$nullDemo = null;</p>
<p>?&gt;</p>
<p><span style="TEXT-DECORATION: underline">Assigining numerical varibles in other base or notation</span></p>
<p>&lt;?php</p>
<p>// 9, specified as octal value</p>
<p>$anOctalVariable = 011;</p>
<p>// 1500, specified as hexadecimal value</p>
<p>$anHexVariable = 0x5dc;</p>
<p>// 780, in scientific power notation</p>
<p>$powerVariable = 7.8E+2;</p>
<p>?&gt;</p>
<p><span style="TEXT-DECORATION: underline"><span style="TEXT-DECORATION: underline"><span style="TEXT-DECORATION: underline">Changing variable data type</span></span></span></p>
<p>Unlike other programming language php supports dynamic chnage in data type during runtime, i.e</p>
<p>&lt;?php</p>
<p>// aVariable is defined as string variable</p>
<p>$aVariable = &#8216;Keshav&#8217;;</p>
<p>// Result is : &#8216;string&#8217;</p>
<p>echo gettype($aVariable);</p>
<p>// Assigning new integer value to aVariable</p>
<p>$aVariable = 100.20;</p>
<p>// Result is : &#8216;double&#8217;</p>
<p>echo gettype($whoami);</p>
<p>?&gt;</p>
<p>As you might have observed PHP&#8217;s gettype() operator can be used to identify the data type of variable it is holding.</p>
<p>Casting variable data from one type to other (For more details refer <a href="http://www.php.net/manual/en/language.types.type-juggling.php" target="_blank">php.net document</a>)</p>
<p style="TEXT-ALIGN: left"><span style="FONT-FAMILY: Courier; FONT-SIZE: 0.6em">&lt;?php</span></p>
<p style="TEXT-ALIGN: left">// Define floating-point variable</p>
<p style="TEXT-ALIGN: left">$rate = 151.79;</p>
<p style="TEXT-ALIGN: left">// Cast to Integer</p>
<p style="TEXT-ALIGN: left">$newRate = (integer) $rate;</p>
<p style="TEXT-ALIGN: left">// Result: 151</p>
<p style="TEXT-ALIGN: left">echo $newRate;</p>
<p>?&gt;</p>
<p>Following functions can be used to check the datatype (Function name are self explanatory)</p>
<p>is_bool() <br/>is_numeric() <br/>is_int() <br/>is_float() <br/>is_string() <br/>is_null() <br/>is_array() <br/>is_object()</p>
<p>An integer can hold <span style="FONT-FAMILY: Times-Roman; FONT-SIZE: 0.9em"><span style="FONT-FAMILY: Times-Roman; FONT-SIZE: 0.9em">2147483647 as the biggest number (Check <span style="FONT-FAMILY: Courier; FONT-SIZE: 0.9em"><span style="FONT-FAMILY: Courier; FONT-SIZE: 0.9em">PHP_INT_MAX)</span></span></span></span></p>
<p><span style="TEXT-DECORATION: underline">Constants in php</span></p>
<p>In php you can define constants as below (The values assigned to constants will remain constants thruout the program)</p>
<p style="TEXT-ALIGN: left"><span style="FONT-FAMILY: Courier; FONT-SIZE: 0.6em">&lt;?php</span></p>
<p style="TEXT-ALIGN: left">define (&#8216;PRODUCT&#8217;, &#8216;Apple&#8217;);</p>
<p style="TEXT-ALIGN: left">define (&#8216;RATE&#8217;, 21.6);</p>
<p style="TEXT-ALIGN: left">echo &#8216;Fruit &#8216; . PRODUCT . &#8216; costs &#8216; . RATE . &#8216; per piece&#8217;;</p>
<p>?&gt;</p>
<p>Preferably use all letter as capital to identify constants (Not mandatory)</p>
<p>Airthmatic operations on php variables</p>
<p>php supports +(add), -(subtract), *(multiply), / (division), % (modulus or reminder) operations on variables. Following example is self explanatory</p>
<p style="TEXT-ALIGN: left"><span style="FONT-FAMILY: Courier; FONT-SIZE: 0.6em">&lt;?php</span></p>
<p style="TEXT-ALIGN: left">$a = 12;</p>
<p style="TEXT-ALIGN: left">$b = 6;</p>
<p style="TEXT-ALIGN: left">$c = 5;</p>
<p style="TEXT-ALIGN: left">// addition</p>
<p style="TEXT-ALIGN: left">$sum = $a + $b;</p>
<p style="TEXT-ALIGN: left">echo &#8220;$a + $b = $sum\n&#8221;;</p>
<p style="TEXT-ALIGN: left">// subtract</p>
<p style="TEXT-ALIGN: left">$difference = $a &#8211; $b;</p>
<p style="TEXT-ALIGN: left">echo &#8220;$a &#8211; $b = $difference\n&#8221;;</p>
<p style="TEXT-ALIGN: left">// multiply</p>
<p style="TEXT-ALIGN: left">$product = $a * $b;</p>
<p style="TEXT-ALIGN: left">echo &#8220;$a * $b = $product\n&#8221;;</p>
<p style="TEXT-ALIGN: left">// divide and get quotient</p>
<p style="TEXT-ALIGN: left">$quotient = $a / $b;</p>
<p style="TEXT-ALIGN: left">echo &#8220;$a / $b = $quotient\n&#8221;;</p>
<p style="TEXT-ALIGN: left">// divide and get reminder</p>
<p style="TEXT-ALIGN: left">$modulus = $a % $c;</p>
<p style="TEXT-ALIGN: left">echo &#8220;$a % $c = $modulus\n&#8221;;</p>
<p style="TEXT-ALIGN: left">?&gt;</p>
<p style="TEXT-ALIGN: left">String concatenation</p>
<p style="TEXT-ALIGN: left">php uses .(period) operator to concate two string values, e.g:</p>
<p style="TEXT-ALIGN: left">&lt;?php</p>
<p style="TEXT-ALIGN: left">$firstname =&#8217;Keshav&#8217;;</p>
<p style="TEXT-ALIGN: left">$lastname = &#8216;Shetty&#8217;;</p>
<p style="TEXT-ALIGN: left">$fullname = $firstname . &#8216; &#8216; . $lastname;</p>
<p style="TEXT-ALIGN: left">echo $fullname;</p>
<p style="TEXT-ALIGN: left">?&gt;</p>
<p style="TEXT-ALIGN: left">Comparing varibales in php (For more details refer <a href="http://www.php.net/manual/en/types.comparisons.php" target="_blank">php.net document</a>)</p>
<p style="TEXT-ALIGN: left">php provides following comparison operators</p>
<p style="TEXT-ALIGN: left">== (Equal to) <br/>!= (Not equal) <br/>&gt; (Greater than) <br/>&gt;= (Greater than or equal to) <br/>&lt; (Less than) <br/>&lt;= (Less than or equal to) <br/>=== (Equal to and of the same data type &#8211; Can be used when strict comparing integer and float variable or bool with integer etc)</p>
<p style="TEXT-ALIGN: left">Logical operators in php</p>
<p style="TEXT-ALIGN: left">php has following logical operators</p>
<p style="TEXT-ALIGN: left">&amp;&amp; AND <br/>|| OR <br/>! NOT (Negate)</p>
<p style="TEXT-ALIGN: left">Additional assignment operator (Refer <a href="http://www.php.net/manual/en/language.operators.php" target="_blank">php.net manuals</a>)</p>
<p style="TEXT-ALIGN: left">++ Increment by one <br/>&#8211; Decrement by one <br/>+= Add and assign <br/>-= Subtract and assign <br/>*= Multiply and assign <br/>/= Divide and assign quotient <br/>%= Divide and assign modulus or reminder <br/>.= Concatenate and assign, please note period symbol before equal(Applicable to strings)</p>
<p style="TEXT-ALIGN: left">Retriving form values in submit page thru $_POST container.</p>
<p style="TEXT-ALIGN: left">Following example demostrates the use of retriving values from input.php to result.php</p>
<p style="TEXT-ALIGN: left"><span style="TEXT-DECORATION: underline">input.php</span></p>
<p style="TEXT-ALIGN: left">&lt;html&gt; <br/>&lt;head&gt;&lt;title /&gt;&lt;/head&gt; <br/>&lt;body&gt; <br/>&lt;h2&gt;Eneter your age&lt;/h2&gt; <br/>&lt;form method=&#8221;post&#8221; action=&#8221;result.php&#8221;&gt; <br/>Age: &lt;br /&gt; <br/>&lt;input type=&#8221;text&#8221; name=&#8221;ageBox&#8221; /&gt; &lt;p /&gt; <br/>&lt;input type=&#8221;submit&#8221; /&gt; <br/>&lt;/form&gt; <br/>&lt;/body&gt; <br/>&lt;/html&gt;</p>
<p style="TEXT-ALIGN: left"><span style="TEXT-DECORATION: underline">result.php</span></p>
<p style="TEXT-ALIGN: left">&lt;html&gt; <br/>&lt;head&gt;&lt;title /&gt;&lt;/head&gt; <br/>&lt;body&gt; <br/>&lt;?php $userAge = $_POST['ageBox']; ?&gt;</p>
<p style="TEXT-ALIGN: left">&lt;h2&gt;Your are &lt;?php echo $userAge; ?&gt; years old&lt;/h2&gt;</p>
<p style="TEXT-ALIGN: left">&lt;/body&gt; <br/>&lt;/html&gt;</p>
<p style="TEXT-ALIGN: left">The form data of Html forms submitted as get can be retrieved thru $_GET container. (For more details refer <a href="http://www.php.net/manual/en/language.variables.external.php" target="_blank">php.net manuals</a>)</p>
<p style="TEXT-ALIGN: left">
]]></content:encoded>
			<wfw:commentRss>http://blog.adityon.com/2009/11/php-chapter-1-variables-and-operators/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Index</title>
		<link>http://blog.adityon.com/2009/11/php-index/</link>
		<comments>http://blog.adityon.com/2009/11/php-index/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 17:50:00 +0000</pubDate>
		<dc:creator>Keshav Shetty</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Learn php]]></category>
		<category><![CDATA[php tutorial]]></category>

		<guid isPermaLink="false">http://blog.adityon.com/2009/11/php-index/</guid>
		<description><![CDATA[
Introduction to php
Install and setup php development environment (for MS Windows)
Chapter 1

]]></description>
			<content:encoded><![CDATA[<ol>
<li><a href="http://blog.adityon.com/2009/11/php-introduction/">Introduction to php</a></li>
<li><a href="http://blog.adityon.com/2009/11/php-installation-and-setup/">Install and setup php development environment (for MS Windows)</a></li>
<li><a href="http://blog.adityon.com/2009/11/php-chapter-1-variables-and-operators/">Chapter 1</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.adityon.com/2009/11/php-index/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP introduction</title>
		<link>http://blog.adityon.com/2009/11/php-introduction/</link>
		<comments>http://blog.adityon.com/2009/11/php-introduction/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 17:47:00 +0000</pubDate>
		<dc:creator>Keshav Shetty</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Learn php]]></category>
		<category><![CDATA[php tutorial]]></category>

		<guid isPermaLink="false">http://blog.adityon.com/2009/11/php-introduction/</guid>
		<description><![CDATA[The PHP Hypertext Preprocessor.
The initial version PHP was written by Rasmus Lerdorf in 1995 and known as PHP/FI i.e Personal Home Page / Forms Interpreter.
Over the period of 15 years PHP evolved into major and great language for web development, latest 5.0+ version supports object model.
Today it is preferred language for data-driven web application, its popularity grown to such an extent that today it is hosted over 30 million web site which accounts for over 20% of the domains on the Internet
For the complete history visit php history
As free lancer ...]]></description>
			<content:encoded><![CDATA[<p>The PHP Hypertext Preprocessor.</p>
<p>The initial version PHP was written by Rasmus Lerdorf in 1995 and known as PHP/FI i.e Personal Home Page / Forms Interpreter.</p>
<p>Over the period of 15 years PHP evolved into major and great language for web development, latest 5.0+ version supports object model.</p>
<p>Today it is preferred language for data-driven web application, its popularity grown to such an extent that today it is hosted over 30 million web site which accounts for over 20% of the domains on the Internet</p>
<p>For the complete history visit <a href="http://www.php.net/manual/en/history.php.php" target="_blank">php history</a></p>
<p>As free lancer and php consultant you can earn much more thru online portal development works available from <a href="http://www.odesk.com" target="_blank">oDesk</a>, <a href="http://www.getafreelancer.com/" target="_blank">getAFreelancer</a> etc</p>
<p>Some of the best feature of PHP are</p>
<ul dir="ltr">
<li><strong>Performance</strong> &#8211; Compare to other language in same web development category like JSP, ASP etc, PHP is the fastest and highly optimized web development language (Actually it is interprester)</li>
<li><strong>Open source</strong> <strong>&amp; Support</strong> &#8211; entirely developed by open source community, freely available and millions of developers community to help</li>
<li><strong>Portability</strong> &#8211; Today php interpreter available almost all OS and platform which includes Unix, Linux, Windows, Mac etc</li>
<li><strong>Easy to learn and master</strong></li>
<li><strong>Supports various third party application</strong></li>
</ul>
<p>Few of the most popular web applications which are completeley written in php are</p>
<ol>
<li>WordPress (<a href="http://www.wordpress.org/" target="_blank">http://www.wordpress.org/</a>)</li>
<li>phpBB (<a href="http://www.phpbb.com/" target="_blank">http://www.phpbb.com/</a>)</li>
<li>phpMyAdmin (<a href="http://www.phpmyadmin.net/" target="_blank">http://www.phpmyadmin.net/</a>) and many more</li>
</ol>
<p>Continue with next lesson setup <a href="http://blog.adityon.com/2009/11/php-installation-and-setup/">php development environment</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adityon.com/2009/11/php-introduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP installation and setup</title>
		<link>http://blog.adityon.com/2009/11/php-installation-and-setup/</link>
		<comments>http://blog.adityon.com/2009/11/php-installation-and-setup/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 17:47:00 +0000</pubDate>
		<dc:creator>Keshav Shetty</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Learn php]]></category>
		<category><![CDATA[php tutorial]]></category>

		<guid isPermaLink="false">http://blog.adityon.com/2009/11/php-installation-and-setup/</guid>
		<description><![CDATA[In order to start development with php you need three components

Database (I prefer Mysql)
Web server (I prefer Apache)
PHP interpreter

I assume you are using MS Windows for your development.
First download and install MySql from MySql 5.0 downloads
Next download and install Apache from Apache 2.2 downloads
Next download and unzip php to say c: from PHP 5.2 download
Some additional steps

Copy php.ini-recommended as php.ini in your PHP installation directory
In new php.ini file update the properties extension_dir = &#8220;c:\php\ext\&#8221; (I assume that you extracted php to c:\php folder &#8211; if it is different update your ...]]></description>
			<content:encoded><![CDATA[<p>In order to start development with php you need three components</p>
<ol>
<li>Database (I prefer Mysql)</li>
<li>Web server (I prefer Apache)</li>
<li>PHP interpreter</li>
</ol>
<p>I assume you are using MS Windows for your development.</p>
<p>First download and install MySql from <a href="http://dev.mysql.com/downloads/mysql/5.0.html" target="_blank">MySql 5.0 downloads</a></p>
<p>Next download and install Apache from <a href="http://apache.deathculture.net/httpd/binaries/win32/apache_2.2.14-win32-x86-no_ssl.msi" target="_blank">Apache 2.2 downloads</a></p>
<p>Next download and unzip php to say c: from <a href="http://in2.php.net/distributions/php-5.2.11-Win32.zip" target="_blank">PHP 5.2 download</a></p>
<p><strong>Some additional steps</strong></p>
<ol>
<li>Copy php.ini-recommended as php.ini in your PHP installation directory</li>
<li>In new php.ini file update the properties extension_dir = &#8220;c:\php\ext\&#8221; (I assume that you extracted php to c:\php folder &#8211; if it is different update your correct path)</li>
<li>In new php.ini file enable extension=php_pdo.dll extension=php_sqlite.dll extension=php_mysql.dll extension=php_pdo_mysql.dll</li>
<li>Edit httpd.conf file under conf folder of Apache installation, add the following lines at the end of the file</li>
</ol>
<p>AddType application/x-httpd-php .php <br/>LoadModule php5_module &#8220;c:\php\php5apache2_2.dll&#8221; <br/>SetEnv PHPRC C:\php\</p>
<p>Thats it your dev environment is ready. Start the Apache server.</p>
<p>Write a simple file called as test.php with the following content</p>
<p>&lt;?php echo &#8216;Welcome to php&#8217;; ?&gt;</p>
<p>and save it as test.php under the folder <strong>htdocs</strong> of your apache installation folder.</p>
<p>From you web browser access the file as http://localhost/test.php</p>
<p>You should see the result as <strong><em>Welcome to php</em></strong></p>
<p>Continue with next lesson <a href="http://blog.adityon.com/2009/11/php-chapter-1-variables-and-operators/">Variables &amp; operators</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adityon.com/2009/11/php-installation-and-setup/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

