<?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>PHP MySQL Tutorials</title>
	<atom:link href="http://www.phpmysqlbrain.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phpmysqlbrain.com</link>
	<description>PHP MySQL &#124; PHP Tutorials &#124; MySQL Tutorials &#124; PHP Scripts &#124; Programming Samples</description>
	<lastBuildDate>Wed, 28 Sep 2011 14:43:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Split a string and store into an array</title>
		<link>http://www.phpmysqlbrain.com/scripts/split-a-string-and-store-into-an-array/</link>
		<comments>http://www.phpmysqlbrain.com/scripts/split-a-string-and-store-into-an-array/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 12:02:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP SCRIPTS]]></category>

		<guid isPermaLink="false">http://www.phpmysqlbrain.com/?p=279</guid>
		<description><![CDATA[This PHP script code is for split a string into the specified length and store it into an array. Here we are using a form to enter the string to split , length at which split process and the cut mode . In normal cut modes split wont happen in the middle of a single word , in strict mode split will happen strictly even in the middle of a single word. &#60;html&#62; &#60;head&#62; &#60;/head&#62; &#60;body&#62; &#60;form name="split" action="" method="post"&#62; Enter the string to Split &#60;input type="text" name="text1" /&#62;&#60;br /&#62; Enter the character length to split:&#60;input type="text" name="len1" /&#62;&#60;br /&#62; Cut Mode;&#60;select name="cut"&#62; &#60;option value=0 t&#62;Normal Cut&#60;/option&#62; &#60;option value=1&#62;Strict Cut&#60;/option&#62; &#60;/select&#62;&#60;br&#62; &#60;input type="submit" value="split" name="btnsubmit" /&#62; &#60;/form&#62; &#60;?php if(isset($_POST['btnsubmit'])) { $text=$_POST['text1']; $len1=$_POST['len1']; $mode=$_POST['cut']; //echo "Original String ".$text; //$count= strlen($text); $newtext = wordwrap($text, $len1, "&#60;***&#62;",$mode); $result=explode('&#60;***&#62;', $newtext); $count= count($result); $i=0; while ($i&#60;$count) { echo "String ".$i." is : &#60;b&#62;".$result[$i]."&#60;/b&#62;&#60;br&#62;"; $i=$i+1; } } ?&#62; &#60;/body&#62; &#60;/html&#62; Here you can watch this script in action VIEW]]></description>
		<wfw:commentRss>http://www.phpmysqlbrain.com/scripts/split-a-string-and-store-into-an-array/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
		<item>
		<title>PHP wordwrap function</title>
		<link>http://www.phpmysqlbrain.com/syntax/php-wordwrap-function/</link>
		<comments>http://www.phpmysqlbrain.com/syntax/php-wordwrap-function/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 11:29:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Strings handling]]></category>
		<category><![CDATA[PHP Syntax]]></category>

		<guid isPermaLink="false">http://www.phpmysqlbrain.com/?p=275</guid>
		<description><![CDATA[PHP wordwrap() function is used for wrapping a string to a given number of characters. It will cut the string at the specified length and insert the string or character we have entered at that position. Its Syntax will be : wordwrap ( string , length , break character , cut mode ); First parameter will be the string to be wrapped Second parameter specifies at which length wrap should occur. Third parameter specified the character or string to be inserted at the specified length. Fourth parameter is optional. This cut mode parameter specified the mode of cutting. When we specify this parameter as TRUE , cutting will occur at the middle of words too , it will strictly cut at the specified length. By default its value will be false , and cutting wont happen in the middle of a word. You will get more clear picture about this wordwrap function after seeing the following sample PHP programs and its output &#60;?php $text="This tutorial will show about wordwrap function"; echo wordwrap($text,5," * ") ?&#62; Its output will be : This * tutorial * will * show * about * wordwrap * function Here we can see that single words [...]]]></description>
		<wfw:commentRss>http://www.phpmysqlbrain.com/syntax/php-wordwrap-function/feed/</wfw:commentRss>
		<slash:comments>39</slash:comments>
		</item>
		<item>
		<title>A Prime Number list generation PHP script</title>
		<link>http://www.phpmysqlbrain.com/scripts/a-prime-number-list-generation-php-script/</link>
		<comments>http://www.phpmysqlbrain.com/scripts/a-prime-number-list-generation-php-script/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 13:48:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP SCRIPTS]]></category>

		<guid isPermaLink="false">http://www.phpmysqlbrain.com/?p=272</guid>
		<description><![CDATA[A prime number is defined as a number which can be only divisible by 1 and that number itself. That number cannot be divisible by any other number. So if we try to divide that number by any other number between one and that number , we will get a remainder. According to the prime number definition number one ( 1 ) wont consider as a primer number. The smallest primer number is 2 . See is a list of primer number below 50 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, Here is a sample PHP script program to create a list of prime numbers In this example we are going to print first 20 prime numbers. &#60;?php $count = 0 ; $number = 2 ; while ($count &#60; 20 ) { $div_count=0; for ( $i=1;$i&#60;=$number;$i++) { if (($number%$i)==0) { $div_count++; } } if ($div_count&#60;3) { echo $number." , "; $count=$count+1; } $number=$number+1; } ?&#62; Its output will be : 2 , 3 , 5 , 7 , 11 , 13 , 17 , 19 , 23 , 29 , 31 , 37 , 41 , 43 , 47 , 53 , [...]]]></description>
		<wfw:commentRss>http://www.phpmysqlbrain.com/scripts/a-prime-number-list-generation-php-script/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHP Fibonacci Series printing</title>
		<link>http://www.phpmysqlbrain.com/scripts/php-fibonacci-series-printing/</link>
		<comments>http://www.phpmysqlbrain.com/scripts/php-fibonacci-series-printing/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 13:03:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP SCRIPTS]]></category>

		<guid isPermaLink="false">http://www.phpmysqlbrain.com/?p=267</guid>
		<description><![CDATA[A Fibonacci Series of numbers will look like 0 , 1 , 1 , 2 , 3 , 5 , 8 , 13 , 21 , 34 , 55 First two Fibonacci numbers are 0 and 1 . After that each number will be the sum of previous two numbers . Here we can see that third Fibonacci number is 1 ( sum of first two numbers 0 + 1 ) , and fourth Fibonacci number will be the sum of third and second number ( 1 + 1 = 2 ) , and fifth Fibonacci number will be the sum of fourth and third number ( 2 + 1 = 3 ). The series will go like that infinity . Now we can learn how to make a Fibonacci series using PHP . Here is the PHP script for printing first 20 Fibonacci numbers . &#60;?php $count = 0 ; $f1 = 0; $f2 = 1; echo $f1." , "; echo $f2." , "; while ($count &#60; 20 ) { $f3 = $f2 + $f1 ; echo $f3." , "; $f1 = $f2 ; $f2 = $f3 ; $count = $count + 1; } ?&#62; Its output will be [...]]]></description>
		<wfw:commentRss>http://www.phpmysqlbrain.com/scripts/php-fibonacci-series-printing/feed/</wfw:commentRss>
		<slash:comments>41</slash:comments>
		</item>
		<item>
		<title>PHP html_entity_decode – convert to characters</title>
		<link>http://www.phpmysqlbrain.com/syntax/php-html_entity_decode-convert-to-characters/</link>
		<comments>http://www.phpmysqlbrain.com/syntax/php-html_entity_decode-convert-to-characters/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 13:24:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Strings handling]]></category>
		<category><![CDATA[PHP Syntax]]></category>

		<guid isPermaLink="false">http://www.phpmysqlbrain.com/?p=254</guid>
		<description><![CDATA[PHP html_entity_decode function is used for covert the HTML entities to its corresponding characters.This function can be used for decode the string maid by htmlentities function.In this tutorial we will learn about the use, syntax and declaration of html_entity_decode function in PHP programs.]]></description>
		<wfw:commentRss>http://www.phpmysqlbrain.com/syntax/php-html_entity_decode-convert-to-characters/feed/</wfw:commentRss>
		<slash:comments>41</slash:comments>
		</item>
		<item>
		<title>PHP htmlentities() – convert characters to html entities</title>
		<link>http://www.phpmysqlbrain.com/syntax/php-htmlentities-convert-characters-to-html-entities/</link>
		<comments>http://www.phpmysqlbrain.com/syntax/php-htmlentities-convert-characters-to-html-entities/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 12:50:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Strings handling]]></category>
		<category><![CDATA[PHP Syntax]]></category>

		<guid isPermaLink="false">http://www.phpmysqlbrain.com/?p=249</guid>
		<description><![CDATA[PHP htmlentities function is used for covert the characters to its HTML entities. This function will automatically identify the characters which have an equivalent HTML entity , and then convert to it.In this tutorial we will learn about the use, syntax and declaration of htmlentities function in PHP programs]]></description>
		<wfw:commentRss>http://www.phpmysqlbrain.com/syntax/php-htmlentities-convert-characters-to-html-entities/feed/</wfw:commentRss>
		<slash:comments>61</slash:comments>
		</item>
		<item>
		<title>PHP search in array</title>
		<link>http://www.phpmysqlbrain.com/syntax/php-search-in-array/</link>
		<comments>http://www.phpmysqlbrain.com/syntax/php-search-in-array/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 13:08:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Syntax]]></category>
		<category><![CDATA[Difference between in_array and array_search]]></category>
		<category><![CDATA[PHP array_search]]></category>
		<category><![CDATA[PHP in_array]]></category>

		<guid isPermaLink="false">http://www.phpmysqlbrain.com/?p=245</guid>
		<description><![CDATA[In this tutorial we are going to learn how to search in array. In PHP we can use in_array() and  array_search() functions for this. In this tutorial we will learn about the use, syntax and declaration and difference between these function for searching a value in array using PHP]]></description>
		<wfw:commentRss>http://www.phpmysqlbrain.com/syntax/php-search-in-array/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP array_key_exists &#8211; checking a key exist in array</title>
		<link>http://www.phpmysqlbrain.com/syntax/php-array_key_exists-checking-a-key-exist-in-array/</link>
		<comments>http://www.phpmysqlbrain.com/syntax/php-array_key_exists-checking-a-key-exist-in-array/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 12:37:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Syntax]]></category>
		<category><![CDATA[search key in array]]></category>

		<guid isPermaLink="false">http://www.phpmysqlbrain.com/?p=243</guid>
		<description><![CDATA[PHP array_key_exists function is used for checking a specified key or index exists in an array. It will return TRUE if the specified key exists in array or it will return FALSE if that key is not present in the array.Its using for a key search in an array. We don&#8217;t need to use loop through complete array and check each time with the key.Just need to use this function for this purpose. Its Syntax will be : array_key_exists function( Key value to search , array ) Now look at a sample PHP program with array_key_exists function for searching a key in array &#60;?php $age = array("Syam"=&#62;30, "Binu"=&#62;25, "Bob"=&#62;50, "cathy"=&#62;30); $key_search="Bob"; if (array_key_exists($key_search,$age)) { echo "KEY EXISTS IN ARRAY"; } else { echo "KEY CANNOT BE FOUND"; } ?&#62; Its output will be : KEY EXISTS IN ARRAY In this example our key is &#8220;Bob&#8221; and that key is there in the declared array. So our array_key_exists() function will return TRUE in this example.]]></description>
		<wfw:commentRss>http://www.phpmysqlbrain.com/syntax/php-array_key_exists-checking-a-key-exist-in-array/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP mail() &#8211; send email</title>
		<link>http://www.phpmysqlbrain.com/syntax/php-mail-send-email/</link>
		<comments>http://www.phpmysqlbrain.com/syntax/php-mail-send-email/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 13:05:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Syntax]]></category>
		<category><![CDATA[Enquiry form for sending email]]></category>
		<category><![CDATA[Sending email from a HTML contact form]]></category>

		<guid isPermaLink="false">http://www.phpmysqlbrain.com/?p=240</guid>
		<description><![CDATA[PHP mail() function is used for sending emails from your website. Syntax of mail() function is : mail (to email , Subject of email , email message , header , additional parameters ); Here First parameter will be the email address of the receiver Second parameter will be the Subject ( title ) of your email Third parameter will be the content of your email , you can use html tags and all for proper formatting Third parameter is the header of your email, it will contain all the properties and setting for that email , sender email address also should specify in header , we can also add reply to address , format of email etc in header. Using detailed header is a good practice . Sample of a header $header = &#8220;From: from@gmail.com\r\nContent-type: text/html\r\nReply-To: from@gmail.com&#8221;; In this header we have specified the from address, reply address and content type of the message. Now look at a simple example of mail() function &#60;?php $from="kssyam@gmail.com"; $to="to@gmail.com"; $subject="Test Mail"; $message="Hi ,&#60;br /&#62;". "This is my test email for learning how to send email using PHP mail function &#60;br /&#62;". "Thank You"; $headers = "From: $from\r\nContent-type: text/html"; if(mail($to,$subject, $message, $headers)) { echo [...]]]></description>
		<wfw:commentRss>http://www.phpmysqlbrain.com/syntax/php-mail-send-email/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>PHP explode() &#8211; split a string by string into array</title>
		<link>http://www.phpmysqlbrain.com/syntax/php-explode-split-a-string-by-string-into-array/</link>
		<comments>http://www.phpmysqlbrain.com/syntax/php-explode-split-a-string-by-string-into-array/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 14:36:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Strings handling]]></category>
		<category><![CDATA[PHP Syntax]]></category>

		<guid isPermaLink="false">http://www.phpmysqlbrain.com/?p=236</guid>
		<description><![CDATA[PHP explode() function is used for split a string by another string into an array.This function is used when we need to split a string using a specific character or string present in that string. Its Syntax will be : explode (delimiter string , string to explode , LIMIT ); Here delimiter string will declare at which string occurrence the split process should happen . And LIMIT is an optional parameter for specifying the maximum count of splitting. If we specify LIMIT parameter , maximum number of splitting will be the LIMIT value and the rest of string will be the last element in array. We will get more clear picture about explode() function after seeing some examples. Sample PHP program using explode() function &#60;?php $data="How to split a string using explode"; $splittedstring=explode(" ",$data); foreach ($splittedstring as $key =&#62; $value) { echo "splittedstring[".$key."] = ".$value."&#60;br&#62;"; } ?&#62; Its output will be : splittedstring[0] = How splittedstring[1] = to splittedstring[2] = split splittedstring[3] = a splittedstring[4] = string splittedstring[5] = using splittedstring[6] = explode Here , we are trying to split the string at blank spaces with out optional parameter LIMIT value. And we can see that string is split at [...]]]></description>
		<wfw:commentRss>http://www.phpmysqlbrain.com/syntax/php-explode-split-a-string-by-string-into-array/feed/</wfw:commentRss>
		<slash:comments>37</slash:comments>
		</item>
	</channel>
</rss>

