<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5471776926780989448</id><updated>2012-01-19T19:22:55.246+05:30</updated><category term='Object-Oriented PHP Programming'/><category term='PHP'/><category term='PHP Interview Questions and Answers'/><category term='JQuery'/><category term='Download PHP Script'/><category term='Wordpress'/><category term='MySQL'/><category term='MySQL Interview question'/><title type='text'>Learn PHP - PHP Tutorials - PHP Interview Questions and Answers - PHP with MySQL Tutorials</title><subtitle type='html'>Learn PHP, PHP Tutorial, PHP Code, PHP, MySQL, MySQL Database, SQL, SQL Code,  HTML, Javascript, JQuery, Ajax, hypertext</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default?start-index=101&amp;max-results=100'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>146</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-2905563880058670087</id><published>2012-01-16T02:06:00.002+05:30</published><updated>2012-01-16T02:07:12.538+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Wordpress'/><title type='text'>Display custom text in wordpress</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;Display custom text in wordpress&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Using modified the_excerpt() function we can display an excerpt which is not longer than a predetermined length and doesn’t cut off in mid-sentence.&lt;br /&gt;&lt;br /&gt;To do is open functions.php file and paste the code below in it which works as a function&lt;br /&gt;&lt;br /&gt;// Variable &amp;amp; intelligent excerpt length.&lt;br /&gt;function print_excerpt($length) { // Max excerpt length. Length is set in characters&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; global $post;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $text = $post-&amp;gt;post_excerpt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ( '' == $text ) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $text = get_the_content('');&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $text = apply_filters('the_content', $text);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $text = str_replace(']]&amp;gt;', ']]&amp;gt;', $text);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $text = strip_shortcodes($text); // optional, recommended&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $text = strip_tags($text); // use ' $text = strip_tags($text,'&amp;lt; p &amp;gt;&amp;lt; a &amp;gt;'); ' if you want to keep some tags&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $text = substr($text,0,$length);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $excerpt = reverse_strrchr($text, '.', 1);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( $excerpt ) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; echo apply_filters('the_excerpt',$excerpt);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; echo apply_filters('the_excerpt',$text);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Returns the portion of haystack which goes until the last occurrence of needle&lt;br /&gt;function reverse_strrchr($haystack, $needle, $trail) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return strrpos($haystack, $needle) ? substr($haystack, 0, strrpos($haystack, $needle) + $trail) : false;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now you can use the print_excerpt() function in the theme files like this:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;print_excerpt(50);&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-2905563880058670087?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/2905563880058670087/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2012/01/display-custom-text-in-wordpress.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/2905563880058670087'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/2905563880058670087'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2012/01/display-custom-text-in-wordpress.html' title='Display custom text in wordpress'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-2882237444096639243</id><published>2011-12-28T21:27:00.002+05:30</published><updated>2011-12-28T21:33:36.712+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Wordpress'/><title type='text'>Display a thumbnail from a Youtube using a shortcode</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;&amp;nbsp;How to display a thumbnail from a Youtube using a shortcode&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Copy the following code below and then paste it into the functions.php file under theme folder.&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; THis Shortcode will display youtube thumbnail on the wordpress blog.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Usage:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [youtube_thumb id="VIDEO_ID" img="0" align="left"]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; VIDEO_ID= Youtube video id&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; img=0,1,2 or 3&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; align= left,right,center&lt;br /&gt;*/&lt;br /&gt;function wp_youtube_video_thumbnail($atts) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; extract(shortcode_atts(array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'id' =&amp;gt; '',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'img' =&amp;gt; '0',&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'align'=&amp;gt;'left'&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ), $atts));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $align_class='align'.$align;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-4mJ6ke5ZAY0/Tvs9Q4TUatI/AAAAAAAAGSo/vuF5AcJPANc/s1600/sandip-das-blog.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="100" src="http://1.bp.blogspot.com/-4mJ6ke5ZAY0/Tvs9Q4TUatI/AAAAAAAAGSo/vuF5AcJPANc/s640/sandip-das-blog.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;}&lt;br /&gt;add_shortcode('youtube_thumb', 'wp_youtube_video_thumbnail');&lt;br /&gt;&lt;br /&gt;Now, you can use the shortcode. The shortcode accept 3 parameters: The video ID, the image size (0 for 480*360px, 1 for 120*90) and the image alignment.&lt;br /&gt;&lt;br /&gt;[youtube_thumb id="8O9YA7PZZe0" img="0" align="center"]&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-2882237444096639243?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/2882237444096639243/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/12/display-thumbnail-from-youtube-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/2882237444096639243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/2882237444096639243'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/12/display-thumbnail-from-youtube-using.html' title='Display a thumbnail from a Youtube using a shortcode'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-4mJ6ke5ZAY0/Tvs9Q4TUatI/AAAAAAAAGSo/vuF5AcJPANc/s72-c/sandip-das-blog.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-2447981733874519335</id><published>2011-11-30T02:16:00.003+05:30</published><updated>2011-11-30T02:21:05.190+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Wordpress'/><title type='text'>Automatically remove p tags on images in wordpress</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;Automatically remove p tags on images in wordpress&lt;/b&gt;&lt;br /&gt;Wordpress By default embed images in &amp;lt; p &amp;gt; tags. but if you don’t want those p tags to show, the following example display a great way to remove the &amp;lt; p &amp;gt; tags without having to chnage the WordPress core&lt;br /&gt;&lt;br /&gt;Just paste the following code in theme functions.php file, and save the file.the &lt;br /&gt;tags are gone now.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-sAILMboobV0/TtVFkPlXnJI/AAAAAAAAFpA/p4stVBZbM34/s1600/sandip-das-blog.png" imageanchor="1"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-sAILMboobV0/TtVFkPlXnJI/AAAAAAAAFpA/p4stVBZbM34/s1600/sandip-das-blog.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;add_filter('the_content', 'remove_ptags_on_images');&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-2447981733874519335?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/2447981733874519335/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/11/automatically-remove-p-tags-on-images.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/2447981733874519335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/2447981733874519335'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/11/automatically-remove-p-tags-on-images.html' title='Automatically remove p tags on images in wordpress'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-sAILMboobV0/TtVFkPlXnJI/AAAAAAAAFpA/p4stVBZbM34/s72-c/sandip-das-blog.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-927331611181802614</id><published>2011-10-31T22:09:00.000+05:30</published><updated>2011-11-30T02:16:13.049+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Wordpress'/><title type='text'>Login form shortcode for WordPress</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;Here we learn how to displaying login forms on wordpress using a shortcode&lt;/b&gt;Paste the following  code into functions.php file:&lt;br /&gt;&lt;br /&gt;function sandip_login_form_shortcode() {&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if ( is_user_logged_in() )&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;return '';&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;return wp_login_form( array( 'echo' =&amp;gt; false ) );&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function sandip_add_shortcodes() {&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;add_shortcode( 'sandip-login-form', 'sandip_login_form_shortcode' );&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;add_action( 'init', 'sandip_add_shortcodes' );&lt;br /&gt;&lt;br /&gt;Once done, we can now use the shortcode as shown in the following example. just paste it on the post editor, where you want the login form to be displayed.[sandip-login-form]&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-927331611181802614?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/927331611181802614/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/10/login-form-shortcode-for-wordpress.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/927331611181802614'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/927331611181802614'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/10/login-form-shortcode-for-wordpress.html' title='Login form shortcode for WordPress'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-1305026153997581266</id><published>2011-09-30T00:13:00.001+05:30</published><updated>2011-10-01T04:50:19.711+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Wordpress'/><title type='text'>Retrieve a remote page using WordPress</title><content type='html'>&lt;b&gt;How to retrieve a remote page using WordPress&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you want to get the content,file info from a remote file for use it in wordpress instal then follow the step describe below.&lt;br /&gt;Use the wp_remote_get() function (Or wp_remote_post() is you prefer using the POST method) to retrieve the desired url. The following example describe how to retrieve an url and display its content as well as the file info.&lt;br /&gt;&lt;br /&gt;This code can be used anywhere on your template files.&lt;br /&gt;&lt;br /&gt;$response = wp_remote_get( 'http://sandipdas.in/file.txt' );&lt;br /&gt;if( is_wp_error( $response ) ) {&lt;br /&gt;echo 'Something went wrong!';&lt;br /&gt;} else {&lt;br /&gt;echo 'Response:';&lt;br /&gt;   print_r( $response );&lt;br /&gt;   &lt;br /&gt;';&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-1305026153997581266?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/1305026153997581266/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/09/retrieve-remote-page-using-wordpress.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/1305026153997581266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/1305026153997581266'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/09/retrieve-remote-page-using-wordpress.html' title='Retrieve a remote page using WordPress'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-3077994693286450789</id><published>2011-09-28T05:03:00.001+05:30</published><updated>2011-09-28T05:04:18.386+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Wordpress'/><title type='text'>Display your latest Google+ update on WordPress</title><content type='html'>&lt;b&gt;How to display your latest Google+ upda&lt;/b&gt;te on your WordPress blog&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Just paste the following code where you want to display your latest Google+ update. Don't forget to put your Google+ ID on line 3.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;include_once(ABSPATH.WPINC.'/rss.php');&lt;br /&gt;$googleplus = fetch_feed("http://plusfeed.appspot.com/117307278436515842100&lt;br /&gt;&lt;br /&gt;"); // Replace 117307278436515842100 by your own ID&lt;br /&gt;echo '&lt; a href="';    echo $googleplus-&gt;items[0]['link']; echo '"&gt;';&lt;br /&gt;echo $googleplus-&gt;items[0]['summary'];&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;echo '';&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-3077994693286450789?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/3077994693286450789/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/09/display-your-latest-google-update-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/3077994693286450789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/3077994693286450789'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/09/display-your-latest-google-update-on.html' title='Display your latest Google+ update on WordPress'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-409502670708950108</id><published>2011-08-24T00:35:00.000+05:30</published><updated>2011-08-24T00:35:45.279+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Wordpress'/><title type='text'>Display a thumbnail of any website in wordpress</title><content type='html'>In WordPress we can display a thumbnail of any website. Wordpress have a service named mShots, Its allow us to get snapshots of any website. We can use a shotcode to easily display a snapshot of a given website.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To create the shortcode ,just paste the following code into functions.php file.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function wpr_snap($atts, $content = null) {&lt;br /&gt;        extract(shortcode_atts(array(&lt;br /&gt;			"snap" =&gt; 'http://s.wordpress.com/mshots/v1/',&lt;br /&gt;			"url" =&gt; 'http://www.sandipdas.in',&lt;br /&gt;			"alt" =&gt; 'My image',&lt;br /&gt;			"w" =&gt; '500', // width&lt;br /&gt;			"h" =&gt; '400' // height&lt;br /&gt;        ), $atts));&lt;br /&gt;&lt;br /&gt;	$img = '&lt;img src="' . $snap . '' . urlencode($url) . '?w=' . $w . '&amp;h=' . $h . '" alt="' . $alt . '"/&gt;';&lt;br /&gt;        return $img;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;add_shortcode("snap", "wpr_snap");&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now use the following shortcode to display any snaphot&lt;br /&gt;&lt;br /&gt;[snap url="http://www.sandipdas.in" alt="description" w="500" h="400"]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-409502670708950108?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/409502670708950108/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/08/display-thumbnail-of-any-website-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/409502670708950108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/409502670708950108'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/08/display-thumbnail-of-any-website-in.html' title='Display a thumbnail of any website in wordpress'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-8029190886482488276</id><published>2011-07-23T01:16:00.007+05:30</published><updated>2011-07-24T10:50:25.002+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Wordpress'/><title type='text'>Display Custom Fields Outside Loop in WordPress</title><content type='html'>&lt;b&gt;How to Display Custom Fields Outside The Loop in WordPress&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;When you need to display post-specific content for example a data for a specific post. Usually post specific contents are added via a custom field which can only be displayed inside a post loop.Here we will show you how you can display custom fields outside the loop.&lt;br /&gt;&lt;br /&gt;Please check the following code:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;global $wp_query;&lt;br /&gt;$postid = $wp_query-&gt;post-&gt;ID;&lt;br /&gt;echo get_post_meta($postid, 'Your-Custom-Field-data', true);&lt;br /&gt;wp_reset_query();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You will need to make sure that you change the part where it says “Your-Custom-Field-data”.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-8029190886482488276?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/8029190886482488276/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/07/display-custom-fields-outside-loop-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/8029190886482488276'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/8029190886482488276'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/07/display-custom-fields-outside-loop-in.html' title='Display Custom Fields Outside Loop in WordPress'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-6394874938556530842</id><published>2011-07-05T22:15:00.001+05:30</published><updated>2011-07-05T22:16:35.171+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Wordpress'/><title type='text'>Wordpress Tricks</title><content type='html'>&lt;b&gt;Get Category Name By ID (WordPress)&lt;/b&gt;&lt;br /&gt;eho  get_cat_name( $cat_id );&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Get Category Link By ID (WordPress)&lt;/b&gt;&lt;br /&gt;echo get_category_link($cat_id);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-6394874938556530842?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/6394874938556530842/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/07/wordpress-tricks.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/6394874938556530842'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/6394874938556530842'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/07/wordpress-tricks.html' title='Wordpress Tricks'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-4793759120663959863</id><published>2011-06-26T10:26:00.000+05:30</published><updated>2011-06-26T10:27:14.088+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Wordpress'/><title type='text'>A Custom Read More in Wordpress</title><content type='html'>&lt;b&gt;Display A Custom Read More in Wordpress&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;To display "A Custom Read More" all you need to do is replace your usual the_content template tag with the following code. So when you write a new post, create a new custom field with the key name "custom_more".&lt;br /&gt;&lt;br /&gt; $custommore = get_post_meta($post-&gt;ID, 'custom_more', true);  &lt;br /&gt; if (!$custommore) { $custommore = 'Read More &amp;raquo;'; }  &lt;br /&gt; the_content($custommore);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-4793759120663959863?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/4793759120663959863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/06/custom-read-more-in-wordpress.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/4793759120663959863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/4793759120663959863'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/06/custom-read-more-in-wordpress.html' title='A Custom Read More in Wordpress'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-1949528818223212788</id><published>2011-06-15T22:32:00.000+05:30</published><updated>2011-06-15T22:32:50.432+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Wordpress'/><title type='text'>Detect visitor browser within WordPress</title><content type='html'>&lt;b&gt;How to detect the visitor browser within WordPress&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;To ensure maximum cross-browser compatibility on the wordpress blog theme, We have to able to detect the browser used by the blog visitor. WordPress can detect client browser. I describe the proces below.&lt;br /&gt;&lt;br /&gt;Paste the code below in your functions.php file:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;add_filter('body_class','browser_body_class');&lt;br /&gt;function browser_body_class($classes) {&lt;br /&gt;       global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone;&lt;br /&gt;&lt;br /&gt;       if($is_lynx) $classes[] = 'lynx';&lt;br /&gt;       elseif($is_gecko) $classes[] = 'gecko';&lt;br /&gt;       elseif($is_opera) $classes[] = 'opera';&lt;br /&gt;       elseif($is_NS4) $classes[] = 'ns4';&lt;br /&gt;       elseif($is_safari) $classes[] = 'safari';&lt;br /&gt;       elseif($is_chrome) $classes[] = 'chrome';&lt;br /&gt;       elseif($is_IE) $classes[] = 'ie';&lt;br /&gt;       else $classes[] = 'unknown';&lt;br /&gt;&lt;br /&gt;       if($is_iphone) $classes[] = 'iphone';&lt;br /&gt;       return $classes;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now saved the file and the function will automatically add a CSS class to the body tag, as shown in the exemple below:&lt;br /&gt;&lt;br /&gt;body class="home blog logged-in safari"&lt;br /&gt;&lt;br /&gt;So now with the help of the code, you just have to take your stylesheet, and add some browser-specific styles!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-1949528818223212788?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/1949528818223212788/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/06/detect-visitor-browser-within-wordpress.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/1949528818223212788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/1949528818223212788'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/06/detect-visitor-browser-within-wordpress.html' title='Detect visitor browser within WordPress'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-6245865724514354775</id><published>2011-05-24T23:31:00.002+05:30</published><updated>2011-05-24T23:31:55.874+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Wordpress'/><title type='text'>Display Twitter-like “time ago” on WP</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;Display Twitter-like “time ago” on your WordPress blog &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Twitter have a built-in function that display time from now, like “3 days ago” or “more than a month ago”.If you want to do same with your WordPress post use the following function.&lt;br /&gt;&lt;br /&gt;Paste the following into your functions.php file: &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function post_time_ago( $type = 'post' ) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $d = 'comment' == $type ? 'get_comment_time' : 'get_post_time';&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return human_time_diff($d('U'), current_time('timestamp')) . " " . __('ago');&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Now, you can use the following function in your theme files:&lt;br /&gt;&amp;nbsp;echo post_time_ago();&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-6245865724514354775?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/6245865724514354775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/05/display-twitter-like-time-ago-on-wp_24.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/6245865724514354775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/6245865724514354775'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/05/display-twitter-like-time-ago-on-wp_24.html' title='Display Twitter-like “time ago” on WP'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-7582311377953652174</id><published>2011-05-08T21:21:00.000+05:30</published><updated>2011-05-08T21:21:41.283+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Wordpress'/><title type='text'>How to modify size of embedded videos</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Modify size of embedded videos in wordpress&lt;br /&gt;&lt;br /&gt;&amp;nbsp;In WordPress, it is easy to embed videos on the blog. But sometimes, dealing with&amp;nbsp; the video sizes is a bit painful. Here is a solution how you can adjust the size of any embedded video using a filter in wordpress&lt;br /&gt;&lt;br /&gt;&amp;nbsp;Just&amp;nbsp; paste the following code on the functions.php file. &lt;br /&gt;&lt;br /&gt;&amp;nbsp;function custom_embed_defaults($embed_size){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $embed_size['width'] = 650; // Adjust values to your needs&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $embed_size['height'] = 550;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return $embed_size;&lt;br /&gt;&amp;nbsp;}&lt;br /&gt;&lt;br /&gt;&amp;nbsp;add_filter('embed_defaults', 'custom_embed_defaults');&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-7582311377953652174?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/7582311377953652174/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/05/how-to-modify-size-of-embedded-videos.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/7582311377953652174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/7582311377953652174'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/05/how-to-modify-size-of-embedded-videos.html' title='How to modify size of embedded videos'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-4058071715667925413</id><published>2011-04-23T01:28:00.002+05:30</published><updated>2011-04-23T01:32:39.196+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Wordpress'/><title type='text'>Display wordpress post titles with a custom length</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;Display wordpress post titles with a custom length&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Display wordpress post titles with a custom length&lt;br /&gt;&lt;br /&gt;&amp;nbsp;If you want to&amp;nbsp; display only the first X characters of your wordpress post title, I display here some hack for that.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;The first thing to do is to create the function. Open your functions.php file and paste this code:&lt;br /&gt;&lt;br /&gt;&amp;nbsp; function ODD_title($char) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $title = get_the_title($post-&amp;gt;ID);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $title = substr($title,0,$char);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo $title;&lt;br /&gt;&amp;nbsp;}&lt;br /&gt;&lt;br /&gt;&amp;nbsp;Now, you use the function on your wordpress theme files. Just pass how many characters you want to display as a parameter. In the following example, only the first 30 chars of the title will be displayed:&lt;br /&gt;&lt;br /&gt;ODD_title(20);&lt;br /&gt;&lt;br /&gt;So with the following code you can display wordpress post titles with a custom length&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-4058071715667925413?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/4058071715667925413/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/04/display-wp-post-titles-with-custom.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/4058071715667925413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/4058071715667925413'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/04/display-wp-post-titles-with-custom.html' title='Display wordpress post titles with a custom length'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-7020425466404478093</id><published>2011-04-23T01:20:00.000+05:30</published><updated>2011-04-23T01:20:35.672+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Wordpress'/><title type='text'>Set a maximum word count on post title</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;Set a maximum word count on wordpress post titles&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;If you want to be able to set a maximum word count of post titles so you dont have to think titles that are too long, the following code is help you to overcome that. Here I’ll show you how you can easily set a maximum word count on post titles.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;To apply this hack on wordpress post title , just paste the following ode in your functions.php file:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;function maxWord($title){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; global $post;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $title = $post-&amp;gt;post_title;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (str_word_count($title) &amp;gt;= 10 ) //set this to the maximum number of words&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wp_die( __('Error: your post title is over the maximum word count.') );&lt;br /&gt;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;add_action('publish_post', 'maxWord');&lt;br /&gt;&lt;br /&gt;So with this code you can set a maximum word count on post title&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-7020425466404478093?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/7020425466404478093/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/04/set-maximum-word-count-on-post-title.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/7020425466404478093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/7020425466404478093'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/04/set-maximum-word-count-on-post-title.html' title='Set a maximum word count on post title'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-5809239149395682403</id><published>2011-03-30T00:25:00.003+05:30</published><updated>2011-03-30T00:27:17.966+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Wordpress'/><title type='text'>How to remove WordPress  admin bar from front end</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;In the following process you can&amp;nbsp; remove WordPress 3.1 admin bar&lt;br /&gt;&lt;br /&gt;WordPress 3.1 introduced a new feature: the admin bar. It is very useful, but if you like to remove it. Please follow the instruction.&lt;br /&gt;&lt;br /&gt;Paste the following piece of code into your functions.php file, save it to remove admin bar.&lt;br /&gt;&lt;br /&gt;wp_deregister_script('admin-bar');&lt;br /&gt;wp_deregister_style('admin-bar');&lt;br /&gt;remove_action('wp_footer','wp_admin_bar_render',1000);&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-5809239149395682403?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/5809239149395682403/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/03/how-to-remove-wordpress-admin-bar-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/5809239149395682403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/5809239149395682403'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/03/how-to-remove-wordpress-admin-bar-from.html' title='How to remove WordPress  admin bar from front end'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-2383444374633028627</id><published>2011-03-24T20:22:00.001+05:30</published><updated>2011-03-24T20:23:11.650+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Wordpress'/><title type='text'>How to replace words in your wordpress posts</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;Replace words in your wordpress posts&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Let your Wordpress blog was named “portfolio” and you renamed it “myportfolio”.  Then don’t edit your xxx posts to replace every single occurence! With this very useful code will do it for you, like a magic!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Just put words to replace in the array on line 4. Once done, paste the  code into your function.php file, save the file, and you're ready!&lt;br /&gt;&lt;br /&gt;function replace_text_wps($text){&lt;br /&gt;&amp;nbsp; &amp;nbsp;$replace = array(&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// 'WORD TO REPLACE' =&amp;gt; 'REPLACE WORD WITH THIS'&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'portfolio' =&amp;gt; 'myportfolio',&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'excerpt' =&amp;gt; 'excerpt',&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'function' =&amp;gt; 'function'&lt;br /&gt;&amp;nbsp; &amp;nbsp;);&lt;br /&gt;&amp;nbsp; &amp;nbsp;$text = str_replace(array_keys($&lt;br /&gt;&lt;div id=":2d9"&gt;&lt;wbr&gt;&lt;/wbr&gt;replace), $replace, $text);&lt;br /&gt;&amp;nbsp; &amp;nbsp;return $text;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;add_filter('the_content', 'replace_text_wps');&lt;br /&gt;add_filter('the_excerpt', 'replace_text_wps');&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-2383444374633028627?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/2383444374633028627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/03/how-to-replace-words-in-your-wordpress.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/2383444374633028627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/2383444374633028627'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/03/how-to-replace-words-in-your-wordpress.html' title='How to replace words in your wordpress posts'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-1221437309113051586</id><published>2011-02-01T21:46:00.002+05:30</published><updated>2011-02-01T21:46:34.429+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Wordpress'/><title type='text'>How to increase WordPress memory limit</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;If ever this happen “Allowed memory size of xxx bytes exhausted”, then we need to increase WordPress memory limit. This can be done &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;open your wp-config file and paste the following code in it.&lt;br /&gt;&lt;br /&gt;define('WP_MEMORY_LIMIT', '96M');&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-1221437309113051586?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/1221437309113051586/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/02/how-to-increase-wordpress-memory-limit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/1221437309113051586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/1221437309113051586'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/02/how-to-increase-wordpress-memory-limit.html' title='How to increase WordPress memory limit'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-9172413080265088939</id><published>2011-01-31T22:01:00.003+05:30</published><updated>2011-02-01T21:41:25.076+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Wordpress'/><title type='text'>Set An Expiration Time For Wordpress Posts</title><content type='html'>&lt;b&gt;Set An Expiration Time For Wordpress Posts&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;Sometimes (like, when we are running a contest), We want to be able to publish a post and then automatically stop displaying it after a certain date. This may seem quite hard to do but using the custom field we can do this easyly.&lt;br /&gt;&lt;br /&gt;To do this Edit the WP theme and replace the current WordPress loop with this "modified" code:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;if (have_posts()) :&lt;br /&gt;while (have_posts()) : the_post(); ?&gt;&lt;br /&gt;$expirationtime = get_post_custom_values('expiration');&lt;br /&gt;if (is_array($expirationtime)) {&lt;br /&gt;$expirestring = implode($expirationtime);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;$secondsbetween = strtotime($expirestring)-time();&lt;br /&gt;if ( $secondsbetween &gt; 0 ) {&lt;br /&gt;// For example...&lt;br /&gt;the_title();&lt;br /&gt;the_excerpt();&lt;br /&gt;}&lt;br /&gt;endwhile;&lt;br /&gt;endif;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To create a post set to expire at a certain date and time, Like create a custom field. Specify expiration as a key and your date and time as a value (with the format mm/dd/yyyy 00:00:00). The post will not show up after the time on that stamp&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;**This code does not remove or unpublish post, It just prevents it from being displayed in the loop.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-9172413080265088939?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/9172413080265088939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/01/set-expiration-time-for-wordpress-posts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/9172413080265088939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/9172413080265088939'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/01/set-expiration-time-for-wordpress-posts.html' title='Set An Expiration Time For Wordpress Posts'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-8255528631589214928</id><published>2011-01-06T20:58:00.000+05:30</published><updated>2011-01-06T20:58:27.033+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>How to make capital letters with CSS style</title><content type='html'>You can &lt;b&gt;capitalize words and letters&lt;/b&gt; with this  css.&lt;br /&gt;&lt;br /&gt;.classname{&lt;br /&gt;text-transform: capitalize;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;This is  make Abcde to Abcde&lt;br /&gt;&lt;br /&gt;.classname{&lt;br /&gt;text-transform: uppercase;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;This is  make abcde to ABCDE&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-8255528631589214928?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/8255528631589214928/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/01/how-to-make-capital-letters-with-css.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/8255528631589214928'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/8255528631589214928'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2011/01/how-to-make-capital-letters-with-css.html' title='How to make capital letters with CSS style'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-2060359810460894091</id><published>2010-12-24T00:34:00.000+05:30</published><updated>2010-12-24T00:34:25.973+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>What is Type Juggling in php</title><content type='html'>Type Juggling in php:&lt;br /&gt;&lt;br /&gt;PHP does not require  explicit type definition in variable declaration. a variable's type is determined by the context in which that variable is used. That is, if you assign a string value to variable $var, $var becomes a string. If you then assign an integer value to $var, it becomes an integer.&lt;br /&gt;&lt;br /&gt;An example of PHP's automatic type conversion is the addition operator '+'. If any of the operands is a float, then all operands are evaluated as floats, and the result will be a float. Otherwise, the operands will be interpreted as integers, and the result will also be an integer. Note that this does NOT change the types of the operands themselves; the only change is in how the operands are evaluated.&lt;br /&gt;&lt;br /&gt;$foo += 2; // $foo is now an integer (2)&lt;br /&gt;$foo = $foo + 1.3; // $foo is now a float (3.3)&lt;br /&gt;$foo = 5 + "10 Little Piggies"; // $foo is integer (15)&lt;br /&gt;$foo = 5 + "10 Small Pigs"; // $foo is integer (15)&lt;br /&gt;&lt;br /&gt;If the last two examples above seem odd, see String conversion to numbers.&lt;br /&gt;If you wish to change the type of a variable, see settype().&lt;br /&gt;If you would like to test any of the examples in this section, you can use the var_dump() function.&lt;br /&gt;Note: The behavior of an automatic conversion to array is currently undefined&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-2060359810460894091?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/2060359810460894091/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/12/what-is-type-juggling-in-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/2060359810460894091'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/2060359810460894091'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/12/what-is-type-juggling-in-php.html' title='What is Type Juggling in php'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-3265479913392238574</id><published>2010-12-24T00:29:00.000+05:30</published><updated>2010-12-24T00:29:36.638+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>What are the functions for IMAP?</title><content type='html'>Internet Message Access Protocol:&lt;br /&gt;&lt;br /&gt;imap_body : Read the message body&lt;br /&gt;imap_check : Check current mailbox&lt;br /&gt;imap_delete : Mark a message for deletion from current mailbox&lt;br /&gt;imap_mail : Send an email message&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-3265479913392238574?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/3265479913392238574/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/12/what-are-functions-for-imap.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/3265479913392238574'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/3265479913392238574'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/12/what-are-functions-for-imap.html' title='What are the functions for IMAP?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-8318444895060673440</id><published>2010-11-19T22:29:00.003+05:30</published><updated>2010-11-19T22:29:46.432+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>What are the database space-saving functions available in php ?</title><content type='html'># Use ip2long() and long2ip() to store the IP adresses as Integers instead&lt;br /&gt;of storing them as strings, which will reduce the space from 15 bytes to 4&lt;br /&gt;bytes. This will also increase search speed and make it easy to see if a ip&lt;br /&gt;falls within a specified range.&lt;br /&gt;&lt;br /&gt;# Use gzcompress() and gzuncompress() to reduce the strings before you&lt;br /&gt;store them in a database. The gzcompress can compress plain-text up to 90%.&lt;br /&gt;The only reason why you shouldn’t use it is when you need full-text&lt;br /&gt;indexing capabilities.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-8318444895060673440?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/8318444895060673440/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/11/what-are-database-space-saving.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/8318444895060673440'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/8318444895060673440'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/11/what-are-database-space-saving.html' title='What are the database space-saving functions available in php ?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-3071967104579540122</id><published>2010-11-19T22:29:00.000+05:30</published><updated>2010-11-19T22:29:46.432+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>How can we save an image from a remote web server to my web server using PHP?</title><content type='html'>$file_rimg = fopen("http://w3answers /image23.jpg",'rb');&lt;br /&gt;$newfile_name_img = "/tmp/tutorial.file";&lt;br /&gt;$file_wnew = fopen($newfile_name_img,'wb');&lt;br /&gt;while (!feof($file_rimg)) {&lt;br /&gt;$chunk_rd = fread($file_rimg,1024);&lt;br /&gt;fwrite($file_wnew,$chunk_rd);&lt;br /&gt;}&lt;br /&gt;fclose($file_wnew);&lt;br /&gt;fclose(file_rimg);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-3071967104579540122?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/3071967104579540122/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/11/how-can-we-save-image-from-remote-web.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/3071967104579540122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/3071967104579540122'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/11/how-can-we-save-image-from-remote-web.html' title='How can we save an image from a remote web server to my web server using PHP?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-4348854003547868520</id><published>2010-11-19T22:27:00.000+05:30</published><updated>2010-11-19T22:29:46.433+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>Is Single Quotes better then double quotes</title><content type='html'>By using single quotes instead of double quotes, we save PHP from having&lt;br /&gt;to parse your string for variables. It's not only is faster, but I find it&lt;br /&gt;more programmer-friendly because it is easier to find variables in your&lt;br /&gt;code.&lt;br /&gt;Also, when referencing an array that has a string index, always use single&lt;br /&gt;quotes. This prevents PHP from having to figure out exactly what you were&lt;br /&gt;trying to say.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-4348854003547868520?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/4348854003547868520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/11/is-single-quotes-better-then-double.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/4348854003547868520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/4348854003547868520'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/11/is-single-quotes-better-then-double.html' title='Is Single Quotes better then double quotes'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-2538748109147751519</id><published>2010-10-30T00:10:00.001+05:30</published><updated>2010-11-19T22:29:46.433+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>How To Protect Special Characters in Query String?</title><content type='html'>If you want to include special characters like spaces in the query string,&lt;br /&gt;you need to &lt;br /&gt;&lt;br /&gt;protect them by applying the urlencode() translation function. The script&lt;br /&gt;below shows &lt;br /&gt;&lt;br /&gt;how to use urlencode():&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;print(“&lt; html &gt;”);&lt;br /&gt;print(“&lt; p &gt;&lt;br /&gt;Please click the links below”&lt;br /&gt;.” to submit comments about FYICenter.com:&lt; /p &gt;&lt;br /&gt;”);&lt;br /&gt;$comment = ‘I want to say: “It\’s a good site! :-&gt;”‘;&lt;br /&gt;$comment = urlencode($comment);&lt;br /&gt;print(“&lt; p &gt;&lt;br /&gt;”&lt;br /&gt;.” &lt;a href=\”processing_forms.php?name=Guest&amp;comment=$comment\”&gt;”&lt;br /&gt;.”It’s an excellent site!&lt;/a&gt; &lt; /p &gt;&lt;br /&gt;”);&lt;br /&gt;$comment = ‘This visitor said: “It\’s an average site! :-(“‘;&lt;br /&gt;$comment = urlencode($comment);&lt;br /&gt;print(“&lt; p &gt;&lt;br /&gt;”&lt;br /&gt;.’&lt;a href=”processing_forms.php?’.$comment.’”&gt;’&lt;br /&gt;.”It’s an average site.&lt;/a&gt;&lt;/p&gt;”);&lt;br /&gt;print(“&lt; /html &gt;”);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-2538748109147751519?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/2538748109147751519/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/10/how-to-protect-special-characters-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/2538748109147751519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/2538748109147751519'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/10/how-to-protect-special-characters-in.html' title='How To Protect Special Characters in Query String?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-8479348422228211831</id><published>2010-10-30T00:08:00.002+05:30</published><updated>2010-11-19T22:29:46.433+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>Advantages and disadvantages of CASCADE STYLE SHEETS?</title><content type='html'>External Style Sheets&lt;br /&gt;Advantages&lt;br /&gt;Can control styles for multiple documents at once Classes can be created&lt;br /&gt;for use on &lt;br /&gt;&lt;br /&gt;multiple HTML element types in many documents Selector and grouping&lt;br /&gt;methods can be &lt;br /&gt;&lt;br /&gt;used to apply styles under complex contexts&lt;br /&gt;&lt;br /&gt;Disadvantages&lt;br /&gt;An extra download is required to import style information for each&lt;br /&gt;document The &lt;br /&gt;&lt;br /&gt;rendering of the document may be delayed until the external style sheet is&lt;br /&gt;loaded &lt;br /&gt;&lt;br /&gt;Becomes slightly unwieldy for small quantities of style definitions&lt;br /&gt;&lt;br /&gt;Embedded Style Sheets&lt;br /&gt;Advantages&lt;br /&gt;Classes can be created for use on multiple tag types in the document&lt;br /&gt;Selector and &lt;br /&gt;&lt;br /&gt;grouping methods can be used to apply styles under complex contexts No&lt;br /&gt;additional &lt;br /&gt;&lt;br /&gt;downloads necessary to receive style information&lt;br /&gt;&lt;br /&gt;Disadvantage&lt;br /&gt;This method can not control styles for multiple documents at once&lt;br /&gt;&lt;br /&gt;Inline Styles&lt;br /&gt;Advantages&lt;br /&gt;Useful for small quantities of style definitions Can override other style &lt;br /&gt;&lt;br /&gt;specification methods at the local level so only exceptions need to be&lt;br /&gt;listed in &lt;br /&gt;&lt;br /&gt;conjunction with other style methods&lt;br /&gt;&lt;br /&gt;Disadvantages&lt;br /&gt;Does not distance style information from content (a main goal of&lt;br /&gt;SGML/HTML) Can not &lt;br /&gt;&lt;br /&gt;control styles for multiple documents at once Author can not create or&lt;br /&gt;control classes &lt;br /&gt;&lt;br /&gt;of elements to control multiple element types within the document Selector&lt;br /&gt;grouping &lt;br /&gt;&lt;br /&gt;methods can not be used to create complex element addressing scenarios&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-8479348422228211831?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/8479348422228211831/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/10/advantages-and-disadvantages-of-cascade.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/8479348422228211831'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/8479348422228211831'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/10/advantages-and-disadvantages-of-cascade.html' title='Advantages and disadvantages of CASCADE STYLE SHEETS?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-7279270241109685640</id><published>2010-09-29T21:00:00.003+05:30</published><updated>2010-09-29T21:01:35.682+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>How To Read the Entire File into a Single String?</title><content type='html'>&lt;b&gt;Read the Entire File into a Single String&lt;/b&gt;&lt;br /&gt;If you have a file, and you want to read the entire file into a single&lt;br /&gt;string, you can use the file_get_contents() function. It opens the&lt;br /&gt;specified file, reads all characters in the file, and returns them in a&lt;br /&gt;single string. Here is a PHP script example on how to file_get_contents():&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;$file = file_get_contents("/windows/system32/drivers/etc/services");&lt;br /&gt;print("Size of the file: ".strlen($file)."\n");&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This script will print:&lt;br /&gt;&lt;br /&gt;Size of the file: 7116&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-7279270241109685640?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/7279270241109685640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/09/how-to-read-entire-file-into-single.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/7279270241109685640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/7279270241109685640'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/09/how-to-read-entire-file-into-single.html' title='How To Read the Entire File into a Single String?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-6931945615874051546</id><published>2010-08-18T23:38:00.001+05:30</published><updated>2010-08-18T23:38:42.039+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>Hide .php extension or Hide PHP Usage using .htaccess</title><content type='html'>If You may not want other people to know that you are using PHP programming... Here is a easy ways to hide the fact that you're using PHP.&lt;br /&gt;Use another extension than .php for your PHP files... your can use .foo, .blabla, .asp or even .htm and .html (in the later case, PHP parses all the files ending in .html, but it will work fine of course if some of these files are plain HTML; slowdown for parsing plain HTML is not noticeable even on the highest loads thanks to PHP's cache).&lt;br /&gt;This process can be done easily by adding the following line to your .htaccess file in the same directory than your code:&lt;br /&gt;AddType application/x-httpd-php .foo .blabla .asp .htm .html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-6931945615874051546?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/6931945615874051546/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/08/hide-php-extension-or-hide-php-usage.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/6931945615874051546'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/6931945615874051546'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/08/hide-php-extension-or-hide-php-usage.html' title='Hide .php extension or Hide PHP Usage using .htaccess'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-2598963951573943268</id><published>2010-08-18T23:37:00.008+05:30</published><updated>2010-08-18T23:41:16.147+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>Send html mail with PHP</title><content type='html'>$to = 'pleace your mail id here';&lt;br /&gt;$subject =’Place your subject here’;&lt;br /&gt;$random_hash = md5(date('r', time()));&lt;br /&gt;$headers = 'From: '.$my_fname.' '.$my_lname.' ' ."&lt; ".$my_email." &gt;". "\r\n";&lt;br /&gt;$headers .= "Reply-To: ". $my_email. "\r\n";&lt;br /&gt;$headers .= "MIME-Version: 1.0\r\n";&lt;br /&gt;$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";&lt;br /&gt;$massage='|table width="100%" border="0" align="center" cellpadding="0" cellspacing="1"|&lt;br /&gt;|tr||td|Title :|/td||td|'.$my_title.'|/td||/tr|&lt;br /&gt;|tr||td|First Name :|/td||td|'.$my_fname.'|/td||/tr|&lt;br /&gt;|tr||td|Last Name :|/td||td|'.$my_lname.'|/td||/tr|&lt;br /&gt;|/table|&lt;br /&gt;’;&lt;br /&gt;@mail( $to, $subject, $massage, $headers );&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-2598963951573943268?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/2598963951573943268/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/08/send-html-mail-with-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/2598963951573943268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/2598963951573943268'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/08/send-html-mail-with-php.html' title='Send html mail with PHP'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-8368870345414256640</id><published>2010-08-18T23:37:00.006+05:30</published><updated>2010-08-18T23:38:42.040+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>How to Ignore User Abort ?</title><content type='html'>When your script is doing something sensible work (like database updating etc.) and you absolutely don't want it to be interrupted by the user pressing the 'Stop' button of his browser. Then just add the following code to your script:&lt;br /&gt;&lt;br /&gt;ignore_user_abort(true);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-8368870345414256640?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/8368870345414256640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/08/how-to-ignore-user-abort.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/8368870345414256640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/8368870345414256640'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/08/how-to-ignore-user-abort.html' title='How to Ignore User Abort ?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-7987451834506562280</id><published>2010-08-18T23:37:00.003+05:30</published><updated>2010-08-18T23:38:42.040+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>How to show PHP credits?.</title><content type='html'>Adding ?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000 at the end of the URL of PHP scripts will expose the PHP credits.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-7987451834506562280?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/7987451834506562280/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/08/how-to-show-php-credits.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/7987451834506562280'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/7987451834506562280'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/08/how-to-show-php-credits.html' title='How to show PHP credits?.'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-9117458411286846750</id><published>2010-08-18T23:36:00.000+05:30</published><updated>2010-08-18T23:38:42.041+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>Create an image on the fly with the GD library</title><content type='html'>Run the following code  to &lt;b&gt;create an image on the fly&lt;/b&gt;:&lt;br /&gt;header ("Content-type: image/png");&lt;br /&gt;$im = @imagecreate (150, 50)&lt;br /&gt;   or die ("Sorry Couldn't create image!");&lt;br /&gt;$background_color = imagecolorallocate ($im, 205, 205, 255);&lt;br /&gt;$text_color = imagecolorallocate ($im, 233, 14, 91);&lt;br /&gt;imagestring ($im, 2, 5, 5,  "Your demo text goes here", $text_color);&lt;br /&gt;imagepng ($im);&lt;br /&gt;imagedestroy($im);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-9117458411286846750?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/9117458411286846750/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/08/create-image-on-fly-with-gd-library.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/9117458411286846750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/9117458411286846750'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/08/create-image-on-fly-with-gd-library.html' title='Create an image on the fly with the GD library'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-2321658778329779861</id><published>2010-08-18T23:34:00.002+05:30</published><updated>2010-08-18T23:38:42.042+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>How to Save bandwidth</title><content type='html'>To save bandwidth add the following code at the beginning of your PHP page, and then  PHP will automatically compress the page to web browsers that support with feature (support in both Internet Explorer and Mozilla Firefox do).&lt;br /&gt;Since HTML can easily be compressed, you can expect to cut down by at least 2/3 the bandwidth used at the expense of some extra load on the server's CPU, but the CPU load difference usually isn't even noticeable.&lt;br /&gt;&lt;br /&gt;@ini_set('zlib.output_compression_level', 1);&lt;br /&gt;@ob_start('ob_gzhandler');&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-2321658778329779861?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/2321658778329779861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/08/how-to-save-bandwidth.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/2321658778329779861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/2321658778329779861'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/08/how-to-save-bandwidth.html' title='How to Save bandwidth'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-7842558878981315943</id><published>2010-07-31T23:06:00.000+05:30</published><updated>2010-07-31T23:07:05.933+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>What is CAPTCHA?</title><content type='html'>CAPTCHA stands for Completely Automated Public Turing Test to tell Computers and Humans Apart. CAPTCHA use for prevent spammers from using bots to automatically fill out forms, CAPTCHA programmers will generate an image containing distorted images of a string of numbers and letters. Computers or bot cannot determine what the numbers and letters are from the image but humans have great pattern recognition abilities and will be able to fairly accurately determine the string of numbers and letters. By entering the numbers and letters from the image in the validation field, the application can be fairly assured that there is a human client using it.&lt;br /&gt;You can get more info here:&lt;br /&gt;http://en.wikipedia.org/wiki/Captcha&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-7842558878981315943?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/7842558878981315943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/07/what-is-captcha.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/7842558878981315943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/7842558878981315943'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/07/what-is-captcha.html' title='What is CAPTCHA?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-887215309930780104</id><published>2010-06-29T22:59:00.001+05:30</published><updated>2010-06-29T23:02:39.505+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySQL Interview question'/><title type='text'>What are the advantages of stored procedures, triggers, indexes?</title><content type='html'>&lt;b&gt;Stored procedure :&lt;/b&gt; Stored procedureis a set of SQL commands that can be compiled and stored in the server. Once this process has been done, user don’t need to keep re-issuing the entire query he can refer to the stored procedure. This provides better overall performance because the query has to be parsed only once and less information needs to be sent between the server and the user. We can also raise the conceptual level by having libraries of functions in the server. However, stored procedures of course do increase the load on the database server system, as more of the work is done on the server side and less on the client (application) side.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Trigger :&lt;/b&gt; A trigger is effectively a type of stored procedure, one that is invoked when a particular event occurs. For example, we can install a stored procedure that is triggered each time a record is deleted from a transaction table and that stored procedure automatically deletes the corresponding customer from a customer table when all his transactions are deleted.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Indexes :&lt;/b&gt; Indexes are used to find rows with specific column values quickly. Without an index, MySQL must begin with the first row and then read through the entire table to find the relevant rows. The larger the table, the more this costs. If the table has an index for the columns in question, MySQL can quickly determine the position to seek to in the middle of the data file without having to look at all the data. If a table has 1,000 rows, this is at least 100 times faster than reading sequentially. If you need to access most of the rows, it is faster to read sequentially, because this minimizes disk seeks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-887215309930780104?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/887215309930780104/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/06/what-are-advantages-of-stored.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/887215309930780104'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/887215309930780104'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/06/what-are-advantages-of-stored.html' title='What are the advantages of stored procedures, triggers, indexes?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-1424523789159974971</id><published>2010-05-15T17:51:00.000+05:30</published><updated>2010-05-15T17:51:54.284+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>How to Extract Domain name from URL ?</title><content type='html'>Here is a simple example describe below.&lt;br /&gt;&lt;br /&gt;“parse_url”  function can be used to parse the URL.&lt;br /&gt;&lt;br /&gt;parse_url is a built in php function which can be used to parse url and get the type of request like whether its http or https or ftp, gives the domain name like www.example.com and path and the query.&lt;br /&gt;&lt;br /&gt;eg. consider this url – “http://www.example.com/page.php?id=1”&lt;br /&gt;&lt;br /&gt;In “http://www.example.com/page.php?id=1”  this url if you execute parse_url function then it will show the following result.&lt;br /&gt;&lt;br /&gt;Scheme - http&lt;br /&gt;url - www.example.com&lt;br /&gt;path - /page.php&lt;br /&gt;query - id=1&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-1424523789159974971?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/1424523789159974971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/05/how-to-extract-domain-name-from-url.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/1424523789159974971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/1424523789159974971'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/05/how-to-extract-domain-name-from-url.html' title='How to Extract Domain name from URL ?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-5996972945582259591</id><published>2010-04-12T15:31:00.002+05:30</published><updated>2010-04-12T15:31:49.690+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>How to Unlink all files and folder in a particular folder?</title><content type='html'>Basically we use &lt;b&gt;"unlink"&lt;/b&gt; to delete a file physically.&lt;br /&gt;The syntax is unlink(file path including file name).&lt;br /&gt;&lt;br /&gt;But if we want to delete all files and folder of a perticular folder then we can use this code&lt;br /&gt;&lt;br /&gt;// arguments : The target directory  , delete directory or leave it blank (true/false) &lt;br /&gt;// return : none&lt;br /&gt;&lt;br /&gt;function removeAll ($dir, $delDir) {&lt;br /&gt;    if(!$dh = @opendir($dir)) return;&lt;br /&gt;    while (false !== ($obj = readdir($dh))) {&lt;br /&gt;        if($obj=='.' || $obj=='..') continue;&lt;br /&gt;        if (!@unlink($dir.'/'.$obj)) removeAll ($dir.'/'.$obj, true);&lt;br /&gt;    }&lt;br /&gt;    if ($delDir){&lt;br /&gt;        closedir($dh);&lt;br /&gt;        @rmdir($dir);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Note: Please change folder permission (0777) before excuting the code&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-5996972945582259591?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/5996972945582259591/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/04/how-to-unlink-all-files-and-folder-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/5996972945582259591'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/5996972945582259591'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/04/how-to-unlink-all-files-and-folder-in.html' title='How to Unlink all files and folder in a particular folder?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-2284930884312895736</id><published>2010-03-21T15:55:00.004+05:30</published><updated>2010-03-21T15:57:45.604+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>What is Crawler and  Indexer</title><content type='html'>&lt;b&gt;Crawler and Indexer&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Typically the crawler is the component of the search engine responsible for going out and retrieving&lt;br /&gt;content for the indexer to catalog. It reads the list of addresses from the database and downloads a copy&lt;br /&gt;of each document to queue locally to disk where the indexer can access them. Then the indexer&lt;br /&gt;component processes each file in the queue. This tag - team approach works well for large search sites&lt;br /&gt;with massive amounts of data continuously being indexed or if the crawler scans through the documents&lt;br /&gt;in search of links to other documents to retrieve (as is the case with recursive downloading/leeching).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-2284930884312895736?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/2284930884312895736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/03/what-is-crawler-indexer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/2284930884312895736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/2284930884312895736'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/03/what-is-crawler-indexer.html' title='What is Crawler and  Indexer'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-4174528059071622780</id><published>2010-02-28T21:44:00.001+05:30</published><updated>2010-02-28T21:44:20.868+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Difference between section and foreach loop in Smarty</title><content type='html'>&lt;b&gt;The main difference between SECTION and FOREACH&lt;/b&gt; is that &lt;br /&gt;&lt;br /&gt;1.For SECTION you can start from a specific value, and can also set a step for the iteration, whereas for FOREACH you have to loop over all values.&lt;br /&gt;&lt;br /&gt;2.foreach is used for associative arrays&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-4174528059071622780?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/4174528059071622780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/02/difference-between-section-and-foreach.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/4174528059071622780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/4174528059071622780'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/02/difference-between-section-and-foreach.html' title='Difference between section and foreach loop in Smarty'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-4241127448501569099</id><published>2010-02-25T22:10:00.000+05:30</published><updated>2010-02-25T22:11:07.659+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Array Functions : How to insert an element or remove an element from an array</title><content type='html'>In this process you can insert an element or remove an element from an array&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;$numbers = array(1,2,3,4,5,6);&lt;br /&gt; print_r($numbers);&lt;br /&gt; echo "&lt;br /&gt;&lt;br /&gt;";&lt;br /&gt; &lt;br /&gt; // shifts first element out of an array&lt;br /&gt; // and returns it.&lt;br /&gt; $a = array_shift($numbers);&lt;br /&gt; echo "a:" . $a ."&lt;br /&gt;";&lt;br /&gt; print_r($numbers);&lt;br /&gt; echo "&lt;br /&gt;&lt;br /&gt;";&lt;br /&gt; &lt;br /&gt; // prepends an element to an array,&lt;br /&gt; // returns the element count.&lt;br /&gt; $b = array_unshift($numbers, 'first');&lt;br /&gt; echo "b: ". $b ."&lt;br /&gt;";&lt;br /&gt; print_r($numbers);&lt;br /&gt; echo "&lt;br /&gt;&lt;br /&gt;";&lt;br /&gt;&lt;br /&gt; echo "&lt;hr /&gt;";&lt;br /&gt; &lt;br /&gt; // pops last element out of an array&lt;br /&gt; // and returns it.&lt;br /&gt; $a = array_pop($numbers);&lt;br /&gt; echo "a: " . $a ."&lt;br /&gt;";&lt;br /&gt; print_r($numbers);&lt;br /&gt; echo "&lt;br /&gt;&lt;br /&gt;";&lt;br /&gt; &lt;br /&gt; // pushes an element onto the end of an array,&lt;br /&gt; // returns the element count.&lt;br /&gt; $b = array_push($numbers, 'last');&lt;br /&gt; echo "b: ". $b ."&lt;br /&gt;";&lt;br /&gt; print_r($numbers);&lt;br /&gt; echo "&lt;br /&gt;&lt;br /&gt;";&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-4241127448501569099?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/4241127448501569099/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/02/array-functions-how-to-insert-element.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/4241127448501569099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/4241127448501569099'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/02/array-functions-how-to-insert-element.html' title='Array Functions : How to insert an element or remove an element from an array'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-557926104670203739</id><published>2010-02-05T22:34:00.003+05:30</published><updated>2010-02-25T22:07:08.231+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Import  mysql data to excel</title><content type='html'>// Connect database.&lt;br /&gt;mysql_connect("localhost","","");&lt;br /&gt;mysql_select_db("import");&lt;br /&gt;&lt;br /&gt;// Get data records from table.&lt;br /&gt;$result=mysql_query("select * from name_list order by id asc");&lt;br /&gt;&lt;br /&gt;// Functions for export to excel.&lt;br /&gt;function xlsBOF() {&lt;br /&gt;echo pack("ssssss", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0);&lt;br /&gt;return;&lt;br /&gt;}&lt;br /&gt;function xlsEOF() {&lt;br /&gt;echo pack("ss", 0x0A, 0x00);&lt;br /&gt;return;&lt;br /&gt;}&lt;br /&gt;function xlsWriteNumber($Row, $Col, $Value) {&lt;br /&gt;echo pack("sssss", 0x203, 14, $Row, $Col, 0x0);&lt;br /&gt;echo pack("d", $Value);&lt;br /&gt;return;&lt;br /&gt;}&lt;br /&gt;function xlsWriteLabel($Row, $Col, $Value ) {&lt;br /&gt;$L = strlen($Value);&lt;br /&gt;echo pack("ssssss", 0x204, 8 + $L, $Row, $Col, 0x0, $L);&lt;br /&gt;echo $Value;&lt;br /&gt;return;&lt;br /&gt;}&lt;br /&gt;header("Pragma: public");&lt;br /&gt;header("Expires: 0");&lt;br /&gt;header("Cache-Control: must-revalidate, post-check=0, pre-check=0");&lt;br /&gt;header("Content-Type: application/force-download");&lt;br /&gt;header("Content-Type: application/octet-stream");&lt;br /&gt;header("Content-Type: application/download");;&lt;br /&gt;header("Content-Disposition: attachment;filename=orderlist.xls ");&lt;br /&gt;header("Content-Transfer-Encoding: binary ");&lt;br /&gt;&lt;br /&gt;xlsBOF();&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;Make a top line on your excel sheet at line 1 (starting at 0).&lt;br /&gt;The first number is the row number and the second number is the column, both are start at '0'&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;xlsWriteLabel(0,0,"List of car company.");&lt;br /&gt;&lt;br /&gt;// Make column labels. (at line 3)&lt;br /&gt;xlsWriteLabel(2,0,"No.");&lt;br /&gt;xlsWriteLabel(2,1,"Company");&lt;br /&gt;&lt;br /&gt;$xlsRow = 3;&lt;br /&gt;&lt;br /&gt;// Put data records from mysql by while loop.&lt;br /&gt;while($row=mysql_fetch_array($result)){&lt;br /&gt;&lt;br /&gt;xlsWriteNumber($xlsRow,0,$row['id']);&lt;br /&gt;xlsWriteLabel($xlsRow,1,$row['name']);&lt;br /&gt;&lt;br /&gt;$xlsRow++;&lt;br /&gt;}&lt;br /&gt;xlsEOF();&lt;br /&gt;exit();&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-557926104670203739?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/557926104670203739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/02/import-mysql-data-to-excel.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/557926104670203739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/557926104670203739'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/02/import-mysql-data-to-excel.html' title='Import  mysql data to excel'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-5183358003971573983</id><published>2010-02-05T22:32:00.001+05:30</published><updated>2010-02-25T22:07:41.546+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Calculate Visitor Counter</title><content type='html'>Follow the step&lt;br /&gt;1. Create a file name "visitcount.dat"&lt;br /&gt;2. Upload the file in webserver&lt;br /&gt;3. make file permission CHMOD  *777*&lt;br /&gt;Now Insert the PHP code below &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;$counterfile = "visitcount.dat";&lt;br /&gt;if(!($fp = fopen($counterfile,"r"))) die ("cannot open counter file");&lt;br /&gt;$count = (int) fread($fp, 20);&lt;br /&gt;fclose($fp);&lt;br /&gt;$count++;&lt;br /&gt;echo "Total hit counter: $count";&lt;br /&gt;$fp = fopen($counterfile, "w");&lt;br /&gt;fwrite($fp , $count);&lt;br /&gt;fclose($fp);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-5183358003971573983?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/5183358003971573983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/02/calculate-visitor-counter.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/5183358003971573983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/5183358003971573983'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/02/calculate-visitor-counter.html' title='Calculate Visitor Counter'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-9121956181888134918</id><published>2010-01-26T19:18:00.001+05:30</published><updated>2010-01-26T19:19:56.500+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>Difference between Split and Explode</title><content type='html'>&lt;b&gt;Split&lt;/b&gt; Support regular expression&lt;br /&gt;&lt;b&gt;Explode&lt;/b&gt; not support regular expression&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-9121956181888134918?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/9121956181888134918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/01/difference-between-split-and-explode.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/9121956181888134918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/9121956181888134918'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2010/01/difference-between-split-and-explode.html' title='Difference between Split and Explode'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-4349586632063271443</id><published>2009-12-31T13:44:00.002+05:30</published><updated>2010-01-26T19:19:11.289+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>Port Numbers</title><content type='html'>&lt;b&gt;Services  Port Numbers&lt;/b&gt; &lt;br /&gt;HTTP     80&lt;br /&gt;FTP     21&lt;br /&gt;TELNET     23&lt;br /&gt;POP3     110&lt;br /&gt;SMTP     25&lt;br /&gt;mIRC     NoneN&lt;br /&gt;NTP     123 &lt;br /&gt;PPTP     1723&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-4349586632063271443?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/4349586632063271443/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/port-numbers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/4349586632063271443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/4349586632063271443'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/port-numbers.html' title='Port Numbers'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-1558560429240718540</id><published>2009-12-31T00:08:00.002+05:30</published><updated>2009-12-31T00:08:15.089+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>If we login more than one browser windows at the same time with same user and after that we close one window, then is the session is exist to other windows or not? And if yes then why? If no then why?</title><content type='html'>Session depends on browser. If browser is closed then session is lost. The session&lt;br /&gt;data will be deleted after session time out. If connection is lost and you recreate&lt;br /&gt;connection, then session will continue in the browser.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-1558560429240718540?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/1558560429240718540/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/if-we-login-more-than-one-browser.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/1558560429240718540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/1558560429240718540'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/if-we-login-more-than-one-browser.html' title='If we login more than one browser windows at the same time with same user and after that we close one window, then is the session is exist to other windows or not? And if yes then why? If no then why?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-3662982401988419528</id><published>2009-12-31T00:04:00.002+05:30</published><updated>2009-12-31T00:04:38.670+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>What are the different functions in sorting an array?</title><content type='html'>&lt;b&gt;Sorting functions in PHP:&lt;/b&gt;&lt;br /&gt;asort()&lt;br /&gt;arsort()&lt;br /&gt;ksort()&lt;br /&gt;krsort()&lt;br /&gt;uksort()&lt;br /&gt;sort()&lt;br /&gt;natsort()&lt;br /&gt;rsort()&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-3662982401988419528?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/3662982401988419528/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/what-are-different-functions-in-sorting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/3662982401988419528'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/3662982401988419528'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/what-are-different-functions-in-sorting.html' title='What are the different functions in sorting an array?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-6356505416838805506</id><published>2009-12-31T00:03:00.000+05:30</published><updated>2009-12-31T00:03:09.765+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>How many ways we can pass the variable through the navigation between the pages?</title><content type='html'>&lt;b&gt;At least 3 ways ways we can pass the variable through the navigation between the pages:&lt;/b&gt;&lt;br /&gt;1. Put the variable into session in the first page, and get it back from session in the&lt;br /&gt;next page.&lt;br /&gt;2. Put the variable into cookie in the first page, and get it back from the cookie in&lt;br /&gt;the next page.&lt;br /&gt;3. Put the variable into a hidden form field, and get it back from the form in the&lt;br /&gt;next page.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-6356505416838805506?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/6356505416838805506/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/how-many-ways-we-can-pass-variable.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/6356505416838805506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/6356505416838805506'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/how-many-ways-we-can-pass-variable.html' title='How many ways we can pass the variable through the navigation between the pages?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-2807042792441573727</id><published>2009-12-29T22:57:00.000+05:30</published><updated>2009-12-29T22:57:48.868+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><category scheme='http://www.blogger.com/atom/ns#' term='MySQL Interview question'/><title type='text'>Sql injection</title><content type='html'>SQL injection is a code injection technique that exploits a security vulnerability occurring in the database layer of an application. The vulnerability is present when user input is either incorrectly filtered for string literal escape characters embedded in SQL statements or user input is not strongly typed and thereby unexpectedly executed. It is an instance of a more general class of vulnerabilities that can occur whenever one programming or scripting language is embedded inside another. SQL injection attacks are also known as SQL insertion attacks.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Source:wikipedia.org&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-2807042792441573727?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/2807042792441573727/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/sql-injection.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/2807042792441573727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/2807042792441573727'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/sql-injection.html' title='Sql injection'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-6322340582438055745</id><published>2009-12-22T00:28:00.002+05:30</published><updated>2009-12-22T00:54:15.209+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>How do I find out the number of parameters passed into function?</title><content type='html'>&lt;b&gt;func_num_args()&lt;/b&gt;&lt;br /&gt;function returns the number of parameters passed in.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-6322340582438055745?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/6322340582438055745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/how-do-i-find-out-number-of-parameters.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/6322340582438055745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/6322340582438055745'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/how-do-i-find-out-number-of-parameters.html' title='How do I find out the number of parameters passed into function?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-3804913308803140291</id><published>2009-12-22T00:27:00.000+05:30</published><updated>2009-12-22T00:27:30.837+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Object-Oriented PHP Programming'/><title type='text'>What's the difference between accessing a class method via -&gt; and via ::?</title><content type='html'>&lt;b&gt;::&lt;/b&gt; is allowed to access methods that can perform static operations, &lt;br /&gt;i.e. those, which do not require object initialization.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-3804913308803140291?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/3804913308803140291/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/whats-difference-between-accessing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/3804913308803140291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/3804913308803140291'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/whats-difference-between-accessing.html' title='What&apos;s the difference between accessing a class method via -&gt; and via ::?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-8059349174045491632</id><published>2009-12-22T00:24:00.002+05:30</published><updated>2009-12-22T00:24:42.857+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><category scheme='http://www.blogger.com/atom/ns#' term='Object-Oriented PHP Programming'/><title type='text'>Are objects passed by value or by reference?</title><content type='html'>Everything is passed by value.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-8059349174045491632?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/8059349174045491632/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/are-objects-passed-by-value-or-by.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/8059349174045491632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/8059349174045491632'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/are-objects-passed-by-value-or-by.html' title='Are objects passed by value or by reference?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-5898256279583684936</id><published>2009-12-22T00:23:00.005+05:30</published><updated>2009-12-22T00:24:03.483+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><category scheme='http://www.blogger.com/atom/ns#' term='Object-Oriented PHP Programming'/><title type='text'>How do you call a constructor for a parent class?</title><content type='html'>parent::constructor($value)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-5898256279583684936?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/5898256279583684936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/how-do-you-call-constructor-for-parent.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/5898256279583684936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/5898256279583684936'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/how-do-you-call-constructor-for-parent.html' title='How do you call a constructor for a parent class?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-8879724840219554575</id><published>2009-12-22T00:23:00.002+05:30</published><updated>2009-12-22T00:23:58.936+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>What’s the special meaning of __sleep and __wakeup?</title><content type='html'>__sleep returns the array of&lt;br /&gt;all the variables than need to be saved, while __wakeup retrieves them.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-8879724840219554575?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/8879724840219554575/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/whats-special-meaning-of-sleep-and_22.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/8879724840219554575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/8879724840219554575'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/whats-special-meaning-of-sleep-and_22.html' title='What’s the special meaning of __sleep and __wakeup?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-2115372096707626844</id><published>2009-12-22T00:14:00.001+05:30</published><updated>2010-01-21T23:35:03.890+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>Explain the differences echo, print and printf ?</title><content type='html'>&lt;b&gt;echo&lt;/b&gt; is the most primitive of them, and just outputs the contents following the construct to the screen. print is also a construct (so parentheses are optional when calling it), but it returns TRUE on successful output and FALSE if it was unable to print out the string.&lt;br /&gt;However, we can pass multiple parameters to echo, like:&lt;br /&gt;&lt;?php echo 'Welcome ', 'to', ' ', 'TechInterviews!'; ?&gt;&lt;br /&gt;and it will output the string "Welcome to PHP MySQL Guide!" &lt;br /&gt;&lt;br /&gt;&lt;b&gt;print&lt;/b&gt; does not take multiple parameters. It is also generally argued that echo is faster, but usually the speed advantage is negligible, and might not be there for future versions of PHP.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;printf&lt;/b&gt; is a function, not a construct, and allows such advantages as formatted output, but it’s the slowest way to print out data out of echo, print and printf.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-2115372096707626844?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/2115372096707626844/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/explain-differences-echo-print-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/2115372096707626844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/2115372096707626844'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/explain-differences-echo-print-and.html' title='Explain the differences echo, print and printf ?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-54186467857603543</id><published>2009-12-22T00:07:00.000+05:30</published><updated>2009-12-22T00:08:03.841+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>What's the output of the ucwords function in this example?</title><content type='html'>$formatted = ucwords("TECHINTERVIEWS IS COLLECTION OF INTERVIEW&lt;br /&gt;QUESTIONS");&lt;br /&gt;print $formatted;&lt;br /&gt;&lt;br /&gt;What will be printed is TECHINTERVIEWS IS COLLECTION OF INTERVIEW&lt;br /&gt;QUESTIONS.&lt;br /&gt;ucwords() makes every first letter of every word capital, but it does not lower-case&lt;br /&gt;anything else. To avoid this, and get a properly formatted string, it’s worth using&lt;br /&gt;strtolower() first.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-54186467857603543?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/54186467857603543/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/whats-output-of-ucwords-function-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/54186467857603543'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/54186467857603543'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/whats-output-of-ucwords-function-in.html' title='What&apos;s the output of the ucwords function in this example?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-7114981456507224370</id><published>2009-12-22T00:06:00.000+05:30</published><updated>2009-12-22T00:08:03.842+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>What’s the difference between htmlentities() and htmlspecialchars()?</title><content type='html'>&lt;b&gt;htmlspecialchars&lt;/b&gt; only takes care of &lt;, &gt;, single quote ‘, double quote " and ampersand.&lt;br /&gt;&lt;b&gt;htmlentities&lt;/b&gt; translates all occurrences of character sequences that have different meaning in HTML.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-7114981456507224370?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/7114981456507224370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/whats-difference-between-htmlentities.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/7114981456507224370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/7114981456507224370'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/whats-difference-between-htmlentities.html' title='What’s the difference between htmlentities() and htmlspecialchars()?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-8901084292757295992</id><published>2009-12-22T00:01:00.002+05:30</published><updated>2009-12-22T00:08:03.842+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>What’s the difference between md5(), crc32() and sha1() crypto on PHP?</title><content type='html'>The major difference is the length of the hash generated. &lt;br /&gt;CRC32 is, evidently, 32 bits, while sha1() returns a 128 bit value, and md5() returns a 160 bit value. This is important when avoiding collisions&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-8901084292757295992?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/8901084292757295992/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/whats-difference-between-md5-crc32-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/8901084292757295992'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/8901084292757295992'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/whats-difference-between-md5-crc32-and.html' title='What’s the difference between md5(), crc32() and sha1() crypto on PHP?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-8353206143943563184</id><published>2009-12-21T23:47:00.000+05:30</published><updated>2009-12-22T00:08:03.842+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>So if md5() generates the most secure hash, why would you ever use the less secure crc32() and sha1()?</title><content type='html'>Crypto usage in PHP is simple, but that doesn’t mean it’s free. &lt;br /&gt;&lt;br /&gt;First off, depending on the data that you’re encrypting, you might have reasons to store a 32- bit value in the database instead of the 160-bit value to save on space. Second, the more secure the crypto is, the longer is the computation time to deliver the hash value. A high volume site might be significantly slowed down, if frequent md5() generation is required.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-8353206143943563184?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/8353206143943563184/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/so-if-md5-generates-most-secure-hash.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/8353206143943563184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/8353206143943563184'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/so-if-md5-generates-most-secure-hash.html' title='So if md5() generates the most secure hash, why would you ever use the less secure crc32() and sha1()?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-6092557280328411885</id><published>2009-12-21T23:34:00.002+05:30</published><updated>2009-12-21T23:41:30.130+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>Write a simple program to get a row of information from a database?</title><content type='html'>$myrow = mysql_query("SELECT name,email FROM visitors ORDER by name LIMIT&lt;br /&gt;1");&lt;br /&gt;$data = mysql_fetch_row($myrow);&lt;br /&gt;$name = $data[0]; &lt;br /&gt;$email = $data[1];&lt;br /&gt;echo "A row from the database is name $name and email $email";&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-6092557280328411885?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/6092557280328411885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/write-simple-program-to-get-row-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/6092557280328411885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/6092557280328411885'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/write-simple-program-to-get-row-of.html' title='Write a simple program to get a row of information from a database?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-8039764080825604264</id><published>2009-12-21T23:32:00.002+05:30</published><updated>2009-12-21T23:41:30.130+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>How do you remove the last letter from a string?</title><content type='html'>There are many ways to do this. An interviewer will be looking for you to use a compact method. Here is probably the simplest method:&lt;br /&gt;&lt;br /&gt;$data = "One too many letterss"; &lt;br /&gt;$newdata = substr($data,0,-1);// now 'one too many letters'&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-8039764080825604264?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/8039764080825604264/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/how-do-you-remove-last-letter-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/8039764080825604264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/8039764080825604264'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/how-do-you-remove-last-letter-from.html' title='How do you remove the last letter from a string?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-2714738654214860988</id><published>2009-12-21T23:31:00.002+05:30</published><updated>2009-12-21T23:41:30.130+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>What do you need to use the image functions in PHP?</title><content type='html'>I need to have access to the GD Library in order to use the image functions in PHP.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-2714738654214860988?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/2714738654214860988/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/what-do-you-need-to-use-image-functions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/2714738654214860988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/2714738654214860988'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/what-do-you-need-to-use-image-functions.html' title='What do you need to use the image functions in PHP?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-6908126149062618699</id><published>2009-12-20T23:39:00.000+05:30</published><updated>2009-12-20T23:40:11.214+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>What can be possible advantages/disadvantages of page caching? How can you prevent caching of a certain page (please give several alternate solutions)?</title><content type='html'>When you use the metatag in the header section at the beginning of an HTML Web page, the Web page may still be cached in the Temporary Internet Files folder.&lt;br /&gt;&lt;br /&gt;A page that Internet Explorer is browsing is not cached until half of the 64 KB buffer is filled. Usually, metatags are inserted in the header section of an HTML document, which appears at the beginning of the document. When the HTML code is parsed, it is read from top to bottom. When the metatag is read, Internet Explorer looks for the existence of the page in cache at that exact moment. If it is&lt;br /&gt;there, it is removed. To properly prevent the Web page from appearing in the cache, place another header section at the end of the HTML document.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-6908126149062618699?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/6908126149062618699/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/what-can-be-possible.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/6908126149062618699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/6908126149062618699'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/what-can-be-possible.html' title='What can be possible advantages/disadvantages of page caching? How can you prevent caching of a certain page (please give several alternate solutions)?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-4482049647707246738</id><published>2009-12-20T23:29:00.002+05:30</published><updated>2009-12-20T23:30:05.401+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>What changes I have to do in php.ini file for file uploading?</title><content type='html'>Make the following line uncomment like:&lt;br /&gt;; Whether to allow HTTP file uploads.&lt;br /&gt;file_uploads = On&lt;br /&gt;; Temporary directory for HTTP uploaded files (will use system default if not&lt;br /&gt;; specified).&lt;br /&gt;upload_tmp_dir = C:\apache2triad\temp&lt;br /&gt;; Maximum allowed size for uploaded files.&lt;br /&gt;upload_max_filesize = 2M&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-4482049647707246738?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/4482049647707246738/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/what-changes-i-have-to-do-in-phpini.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/4482049647707246738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/4482049647707246738'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/what-changes-i-have-to-do-in-phpini.html' title='What changes I have to do in php.ini file for file uploading?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-5309190764775447365</id><published>2009-12-20T23:27:00.000+05:30</published><updated>2009-12-20T23:28:27.473+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>How can I set a cron and how can I execute it in Unix, Linux, and windows?</title><content type='html'>&lt;b&gt;Cron&lt;/b&gt; is very simply a Linux module that allows you to run commands at predetermined times or intervals.&lt;br /&gt;In Windows, it's called Scheduled Tasks. The name Cron is in fact derived from the same word from which we get the word chronology, which means order of time.&lt;br /&gt;The easiest way to use crontab is via the crontab command.&lt;br /&gt;# crontab&lt;br /&gt;This command 'edits' the crontab. Upon employing this command, you will be able to enter the&lt;br /&gt;commands that you wish to run. My version of&lt;br /&gt;Linux uses the text editor vi. You can find information on using vi here.&lt;br /&gt;The syntax of this file is very important – if you get it wrong, your crontab will not function properly.&lt;br /&gt;The syntax of the file should be as follows:&lt;br /&gt;minutes hours day_of_month month day_of_week command&lt;br /&gt;All the variables, with the exception of the command itself, are numerical constants. In addition to an&lt;br /&gt;asterisk (*), which is a wildcard that allows any value, the ranges permitted for each field are as&lt;br /&gt;follows:&lt;br /&gt;Minutes: 0-59&lt;br /&gt;Hours: 0-23&lt;br /&gt;Day_of_month: 1-31&lt;br /&gt;Month: 1-12&lt;br /&gt;Weekday: 0-6&lt;br /&gt;We can also include multiple values for each entry, simply by separating each value with a comma.&lt;br /&gt;command can be any shell command and, as we will see momentarily, can also be used to execute a&lt;br /&gt;Web document such as a PHP file.&lt;br /&gt;So, if we want to run a script every Tuesday morning at 8:15 AM, our mycronjob file will contain the&lt;br /&gt;following content on a single line:&lt;br /&gt;15 8 * * 2 /path/to/scriptname&lt;br /&gt;This all seems simple enough, right? Not so fast! If you try to run a PHP script in this manner, nothing&lt;br /&gt;will happen (barring very special configurations that have PHP compiled as an executable, as&lt;br /&gt;opposed to an Apache module). The reason is that, in order for PHP to be parsed, it needs to be&lt;br /&gt;passed through Apache. In other words, the page needs to be called via a browser or other means of&lt;br /&gt;retrieving&lt;br /&gt;Web content. For our purposes, I'll assume that your server configuration includes wget, as is the&lt;br /&gt;case with most default configurations. To test your configuration, log in to shell. If you're using an&lt;br /&gt;RPM-based system (e.g. Redhat or Mandrake), type the following:&lt;br /&gt;# wget help&lt;br /&gt;If you are greeted with a wget package identification, it is installed in your system.&lt;br /&gt;You could execute the PHP by invoking wget on the URL to the page, like so:&lt;br /&gt;# wget http://www.example.com/file.php&lt;br /&gt;Now, let's go back to the mailstock.php file we created in the first part of this article. We saved it in&lt;br /&gt;our document root, so it should be accessible via the Internet. Remember that we wanted it to run at&lt;br /&gt;4PM Eastern time, and send you your precious closing bell report? Since I'm located in the Eastern&lt;br /&gt;timezone, we can go ahead and set up our crontab to use 4:00, but if you live elsewhere, you might&lt;br /&gt;have to compensate for the time difference when setting this value.&lt;br /&gt;This is what my crontab will look like:&lt;br /&gt;0 4 * * 1,2,3,4,5 we get http://www.example.com/mailstock.php&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-5309190764775447365?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/5309190764775447365/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/how-can-i-set-cron-and-how-can-i_20.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/5309190764775447365'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/5309190764775447365'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/how-can-i-set-cron-and-how-can-i_20.html' title='How can I set a cron and how can I execute it in Unix, Linux, and windows?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-4542823972046597322</id><published>2009-12-20T23:20:00.002+05:30</published><updated>2009-12-20T23:20:24.494+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>What type of headers have to be added in the mail function to attach a file?</title><content type='html'>$boundary = '--' . md5( uniqid ( rand() ) );&lt;br /&gt;$headers = "From: \"Me\"\n";&lt;br /&gt;$headers .= "MIME-Version: 1.0\n";&lt;br /&gt;$headers .= "Content-Type: multipart/mixed; boundary=\"$boundary\"";&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-4542823972046597322?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/4542823972046597322/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/what-type-of-headers-have-to-be-added_20.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/4542823972046597322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/4542823972046597322'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/what-type-of-headers-have-to-be-added_20.html' title='What type of headers have to be added in the mail function to attach a file?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-636143012333240062</id><published>2009-12-20T23:19:00.000+05:30</published><updated>2009-12-20T23:20:24.495+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>What is the difference between Reply-to and Return-path in the headers of a mail function?</title><content type='html'>&lt;b&gt;Reply-to:&lt;/b&gt; Reply-to is where to delivery the reply of the mail.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Return-path:&lt;/b&gt; Return path is when there is a mail delivery failure occurs then where to delivery the failure notification.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-636143012333240062?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/636143012333240062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/what-is-difference-between-reply-to-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/636143012333240062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/636143012333240062'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/what-is-difference-between-reply-to-and.html' title='What is the difference between Reply-to and Return-path in the headers of a mail function?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-2098972384004909580</id><published>2009-12-20T23:17:00.000+05:30</published><updated>2009-12-20T23:17:57.548+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>How to store the uploaded file to the final location?</title><content type='html'>&lt;b&gt;move_uploaded_file ( string filename, string destination)&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This function checks to ensure that the file designated by filename is a valid upload file (meaning&lt;br /&gt;that it was uploaded via PHP's HTTP POST upload mechanism). If the file is valid, it will be moved to the filename given by destination.&lt;br /&gt;If filename is not a valid upload file, then no action will occur, and &lt;b&gt;move_uploaded_file()&lt;/b&gt; will return FALSE.&lt;br /&gt;&lt;br /&gt;If filename is a valid upload file, but cannot be moved for some reason, no action will occur, and &lt;b&gt;move_uploaded_file()&lt;/b&gt; will return FALSE. Additionally, a warning will be issued.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-2098972384004909580?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/2098972384004909580/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/how-to-store-uploaded-file-to-final_20.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/2098972384004909580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/2098972384004909580'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/how-to-store-uploaded-file-to-final_20.html' title='How to store the uploaded file to the final location?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-9004310485674295062</id><published>2009-12-20T17:35:00.000+05:30</published><updated>2009-12-20T17:35:29.009+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='JQuery'/><title type='text'>jQuery's features break down accross eight major categories</title><content type='html'>&lt;b&gt;# Core Functionality&lt;/b&gt;&lt;br /&gt;    Implement core jQuery functions as well as commonly used functions&lt;br /&gt;&lt;b&gt;# Selection and Traversal&lt;/b&gt;&lt;br /&gt;    Proving functions for finding content in documents and navigating among the content of the document&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-9004310485674295062?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/9004310485674295062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/jquerys-features-break-down-accross.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/9004310485674295062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/9004310485674295062'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/jquerys-features-break-down-accross.html' title='jQuery&apos;s features break down accross eight major categories'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-5416514142857722944</id><published>2009-12-20T15:47:00.001+05:30</published><updated>2009-12-20T16:17:24.760+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='JQuery'/><title type='text'>What is jQuery?</title><content type='html'>jQuery is great library for developing ajax based application. jQuery is great library for the JavaScript programmers, which simplifies the development of web 2.0 applications. You can use jQuery to develop cool web 2.0 applications. jQuery helps the programmers to keep code simple and concise. The jQuery library is designed to keep the things very simple and reusable.&lt;br /&gt;&lt;br /&gt;jQuery library simplifies the process of traversal of HTML DOM tree. You can use jQuery to handle events, perform animation, and add the ajax support into your web applications with ease&lt;br /&gt;&lt;br /&gt;#It is free, open JavaScript library &lt;br /&gt;#Simplifies the task of creating highly responsive web page&lt;br /&gt;#Work accross all modern browsers&lt;br /&gt;#Abstract away browser-specific features, allowing you to concentrate on design&lt;br /&gt;#Focusing on simplifying common scripting tasks&lt;br /&gt;    &lt;b&gt;.&lt;/b&gt;Getting and manupulating page content &lt;br /&gt;    &lt;b&gt;.&lt;/b&gt;Working with the modern browser event model&lt;br /&gt;    &lt;b&gt;.&lt;/b&gt;Adding sophisticated effect&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-5416514142857722944?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/5416514142857722944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/what-is-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/5416514142857722944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/5416514142857722944'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/what-is-jquery.html' title='What is jQuery?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-3274598120984027709</id><published>2009-12-16T23:01:00.001+05:30</published><updated>2009-12-16T23:02:41.574+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Download PHP Script'/><title type='text'>Download watermark script</title><content type='html'>&lt;a href="http://www.ziddu.com/download/7768258/watermark.zip.html" target="_blank"&gt;Download watermark script&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-3274598120984027709?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/3274598120984027709/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/download-watermark-script.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/3274598120984027709'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/3274598120984027709'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/download-watermark-script.html' title='Download watermark script'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-5516744722411494178</id><published>2009-12-09T17:29:00.000+05:30</published><updated>2009-12-09T17:30:05.315+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Object-Oriented PHP Programming'/><title type='text'>Public, Protected, and Private Properties</title><content type='html'>When defining a class member in the class definition, the developer&lt;br /&gt;needs to specify one of these three access modifiers before declaring the member&lt;br /&gt;itself. In case you are familiar with PHP 3 or 4’s object model, all class&lt;br /&gt;members were defined with the var keyword, which is equivalent to public in&lt;br /&gt;PHP 5. var has been kept for backward compatibility, but it is deprecated,&lt;br /&gt;thus, you are encouraged to convert your scripts to the new keywords:&lt;br /&gt;class MyClass {&lt;br /&gt;public $publicMember = "Public member";&lt;br /&gt;protected $protectedMember = "Protected member";&lt;br /&gt;private $privateMember = "Private member";&lt;br /&gt;function myMethod(){&lt;br /&gt;// ...&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;$obj = new MyClass();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#Public&lt;/b&gt; members can be accessed both from outside an object by&lt;br /&gt;using $obj-&gt;publicMember and by accessing it from inside the myMethod&lt;br /&gt;method via the special $this variable (for example, $this-&gt;publicMember).&lt;br /&gt;If another class inherits a public member, the same rules apply, and it&lt;br /&gt;can be accessed both from outside the derived class’s objects and from&lt;br /&gt;within its methods.&lt;br /&gt;&lt;b&gt;#Protected&lt;/b&gt;. Protected members can be accessed only from within an&lt;br /&gt;object’s method—for example, $this-&gt;protectedMember. If another class&lt;br /&gt;inherits a protected member, the same rules apply, and it can be accessed&lt;br /&gt;from within the derived object’s methods via the special $this variable.&lt;br /&gt;&lt;b&gt;#Private&lt;/b&gt;. Private members are similar to protected members because they&lt;br /&gt;can be accessed only from within an object’s method. However, they are&lt;br /&gt;also inaccessible from a derived object’s methods. Because private properties&lt;br /&gt;aren’t visible from inheriting classes, two related classes may&lt;br /&gt;declare the same private properties. Each class will see its own private&lt;br /&gt;copy, which are unrelated.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-5516744722411494178?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/5516744722411494178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/public-protected-and-private-properties.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/5516744722411494178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/5516744722411494178'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/public-protected-and-private-properties.html' title='Public, Protected, and Private Properties'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-6168290863855634920</id><published>2009-12-09T15:37:00.001+05:30</published><updated>2009-12-09T15:37:38.940+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Object-Oriented PHP Programming'/><title type='text'>Constructors and Destructors</title><content type='html'>Constructors and Destructors are special methods that automatically called when every object is created or destroyed. So the idea is whenever object created stop constructing it and perform the constructor method and whenever we destroy an object, stop and do the destruction method.+&lt;br /&gt;&lt;br /&gt;Constructors is more useful,its idle for any initializations,that a object may need before its actually going to be used&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In PHP4 Constructors method have the same name as the class&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;class table{&lt;br /&gt;function Table{&lt;br /&gt;//a PHP4 constructor&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;In PHP5 its use as&lt;br /&gt;class table{&lt;br /&gt;function_construct{&lt;br /&gt;//a PHP5 constructor &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;class Table{&lt;br /&gt;public $legs;&lt;br /&gt;&lt;br /&gt;function __construct(){&lt;br /&gt;$this-&gt;legs=4;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;$table= new Table();&lt;br /&gt;echo $table-&gt;legs;&lt;br /&gt;echo "&lt;br /&gt;";&lt;br /&gt;?&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;another example:&lt;br /&gt;&lt;br /&gt;class Table{&lt;br /&gt;public $legs;&lt;br /&gt;static public $total_tables=0;&lt;br /&gt;&lt;br /&gt;function __construct($leg_count=4){&lt;br /&gt;$this-&gt;legs=$leg_count;&lt;br /&gt;Table::$total_tables++;&lt;br /&gt;}&lt;br /&gt;function __destruct(){&lt;br /&gt;Table::$total_tables--;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;$table= new Table();&lt;br /&gt;echo $table-&gt;legs;&lt;br /&gt;echo "&lt;br /&gt;";&lt;br /&gt;&lt;br /&gt;echo Table::$total_tables . "&lt;br /&gt;"; //1&lt;br /&gt;$t1=new Table(5);&lt;br /&gt;echo Table::$total_tables . "&lt;br /&gt;";&lt;br /&gt;$t2=new Table(6);&lt;br /&gt;echo Table::$total_tables . "&lt;br /&gt;";&lt;br /&gt;?&gt;&lt;br /&gt;Constructors and destructors do not have return types nor can they return values.&lt;br /&gt;References and pointers cannot be used on constructors and destructors because their addresses cannot be taken.&lt;br /&gt;Constructors cannot be declared with the keyword virtual.&lt;br /&gt;Constructors and destructors cannot be declared static, const, or volatile.&lt;br /&gt;Unions cannot contain class objects that have constructors or destructors&lt;br /&gt;&lt;br /&gt;Constructors and destructors obey the same access rules as member functions. For example, if you declare a constructor with protected access, only derived classes and friends can use it to create class objects.&lt;br /&gt;&lt;br /&gt;source:lynda.com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-6168290863855634920?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/6168290863855634920/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/constructors-and-destructors.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/6168290863855634920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/6168290863855634920'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/constructors-and-destructors.html' title='Constructors and Destructors'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-2512176163505825781</id><published>2009-12-09T15:36:00.001+05:30</published><updated>2009-12-09T15:37:38.940+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Object-Oriented PHP Programming'/><title type='text'>Static modifier use in php</title><content type='html'>Static method doesn't require an instance (and may return one instead) and is more or less like a global function except for it is put in class' namespace (and therefore avoid collisions with other functions) and has access to class' private members.&lt;br /&gt;&lt;br /&gt;So, use it whenever you're interested in these properties of the function.&lt;br /&gt;&lt;br /&gt;class Student{&lt;br /&gt;static $total_students=0;&lt;br /&gt;&lt;br /&gt;static public function add_student(){&lt;br /&gt;Student::$total_students++;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;static function welcome_students($var="Hello"){&lt;br /&gt;echo "{$var} students";&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;echo Student::$total_students;&lt;br /&gt;echo "&lt;br /&gt;";&lt;br /&gt;echo Student::welcome_students();&lt;br /&gt;echo "&lt;br /&gt;";&lt;br /&gt;echo Student::welcome_students("Welcome");&lt;br /&gt;echo "&lt;br /&gt;";&lt;br /&gt;Student::$total_students=3;&lt;br /&gt;echo Student::$total_students;&lt;br /&gt;echo "&lt;br /&gt;";&lt;br /&gt;Student::$total_students=1;&lt;br /&gt;echo Student::$total_students;&lt;br /&gt;echo "&lt;br /&gt;";&lt;br /&gt;&lt;br /&gt;////Static variable shared through the inherited tree&lt;br /&gt;&lt;br /&gt;class One{&lt;br /&gt;static $foo;&lt;br /&gt;}&lt;br /&gt;class Two extends One{&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;class Three extends One{&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;One::$foo=1;&lt;br /&gt;Two::$foo=2;&lt;br /&gt;Three::$foo=3;&lt;br /&gt;echo One::$foo;&lt;br /&gt;echo "&lt;br /&gt;";&lt;br /&gt;echo Two::$foo;&lt;br /&gt;echo "&lt;br /&gt;";&lt;br /&gt;echo Three::$foo;&lt;br /&gt;?&gt;&lt;br /&gt;&lt;br /&gt;source:lynda.com and stackoverflow.com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-2512176163505825781?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/2512176163505825781/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/static-modifier-use-in-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/2512176163505825781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/2512176163505825781'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/static-modifier-use-in-php.html' title='Static modifier use in php'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-7844806668575415527</id><published>2009-12-09T15:35:00.001+05:30</published><updated>2009-12-09T15:37:38.941+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Object-Oriented PHP Programming'/><title type='text'>Setters and Getters in Access Modifiers</title><content type='html'>The setter and getter method handlers agrees to read/write the values&lt;br /&gt;&lt;br /&gt;class SetterGetterExample{&lt;br /&gt;private $a=1;&lt;br /&gt;public function get_a(){&lt;br /&gt;//log_user_ip_address&lt;br /&gt;return $this-&gt;a;&lt;br /&gt;}&lt;br /&gt;public function set_a($value){&lt;br /&gt;$this-&gt;a=$value;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;$example=new SetterGetterExample();&lt;br /&gt;&lt;br /&gt;//echo $example-&gt;a;&lt;br /&gt;&lt;br /&gt;echo $example-&gt;get_a();&lt;br /&gt;$example-&gt;set_a(15);&lt;br /&gt;echo "&lt;br /&gt;";&lt;br /&gt;echo $example-&gt;get_a();&lt;br /&gt;?&gt;&lt;br /&gt;&lt;br /&gt;Dynamically set and get variable values. This is an abstract class that can be used to dynamically add variables to any class.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-7844806668575415527?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/7844806668575415527/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/setters-and-getters-in-access-modifiers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/7844806668575415527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/7844806668575415527'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/setters-and-getters-in-access-modifiers.html' title='Setters and Getters in Access Modifiers'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-4819066786374484253</id><published>2009-12-09T15:34:00.002+05:30</published><updated>2009-12-09T15:37:38.941+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Object-Oriented PHP Programming'/><title type='text'>Access Modifiers</title><content type='html'>There are 3 access modifiers: Public; Private; and Protected&lt;br /&gt;&lt;br /&gt;'Public' is the default modifier.&lt;br /&gt;&lt;br /&gt;Public: Use In Everywhere&lt;br /&gt;Private: Use in This class only&lt;br /&gt;Protected: Use in This class and subclass&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;class Example{&lt;br /&gt;public $a=1;&lt;br /&gt;protected $b=2;&lt;br /&gt;private $c=3;&lt;br /&gt;&lt;br /&gt;function show_abc(){&lt;br /&gt;echo $this-&gt;a;&lt;br /&gt;echo $this-&gt;b;&lt;br /&gt;echo $this-&gt;c;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public function hello_everyone(){&lt;br /&gt;return "Hello Everyone"."&lt;br /&gt;";&lt;br /&gt;}&lt;br /&gt;protected function hello_family(){&lt;br /&gt;return "Hello Family"."&lt;br /&gt;";&lt;br /&gt;}&lt;br /&gt;private function hello_me(){&lt;br /&gt;return "Hello Me"."&lt;br /&gt;";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function hello(){&lt;br /&gt;$output = $this-&gt;hello_everyone();&lt;br /&gt;$output .= $this-&gt;hello_family();&lt;br /&gt;$output .= $this-&gt;hello_me();&lt;br /&gt;&lt;br /&gt;return $output;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;$example= new Example();&lt;br /&gt;echo "public a:{$example-&gt;a}&lt;br /&gt;";&lt;br /&gt;//echo "protected b:{$example-&gt;b}&lt;br /&gt;";&lt;br /&gt;//echo "private c:{$example-&gt;c}&lt;br /&gt;";&lt;br /&gt;$example-&gt;show_abc();&lt;br /&gt;echo "&lt;br /&gt;";&lt;br /&gt;echo "hello_everyone: {$example-&gt;hello_everyone()}&lt;br /&gt;";&lt;br /&gt;//echo "hello_me: {$example-&gt;hello_me()}&lt;br /&gt;";&lt;br /&gt;echo $example-&gt;hello();&lt;br /&gt;?&gt;&lt;br /&gt;&lt;br /&gt;source:lynda.com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-4819066786374484253?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/4819066786374484253/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/access-modifiers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/4819066786374484253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/4819066786374484253'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/access-modifiers.html' title='Access Modifiers'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-4672395120170004032</id><published>2009-12-09T15:34:00.000+05:30</published><updated>2009-12-09T15:37:38.941+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Object-Oriented PHP Programming'/><title type='text'>Understanding Class Inheritance</title><content type='html'>There are many benefits of inheritance with PHP, the most common is simplifying and reducing instances of redundant code. Class inheritance may sound complicated, but think of it this way. Consider a tree. A tree is made up of many parts, such as the roots that reside in the ground, the trunk, bark, branches, leaves, etc. Essentially inheritance is a connection between a child and its parent.&lt;br /&gt;&lt;br /&gt;class Car{&lt;br /&gt;var $wheels=4;&lt;br /&gt;var $doors=4;&lt;br /&gt;&lt;br /&gt;function wheelsdoors(){&lt;br /&gt;return $this-&gt;wheels + $this-&gt;doors;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;class CompactCar extends Car{&lt;br /&gt;var $doors=2;&lt;br /&gt;function wheelsdoors(){&lt;br /&gt;return $this-&gt;wheels + $this-&gt;doors+ 100;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;$car1 = new Car();&lt;br /&gt;$car2 = new CompactCar();&lt;br /&gt;&lt;br /&gt;echo $car1-&gt;wheels . "&lt;br /&gt;";&lt;br /&gt;echo $car1-&gt;doors . "&lt;br /&gt;";&lt;br /&gt;echo $car1-&gt;wheelsdoors() . "&lt;br /&gt;";&lt;br /&gt;echo "&lt;br /&gt;";&lt;br /&gt;echo $car2-&gt;wheels . "&lt;br /&gt;";&lt;br /&gt;echo $car2-&gt;doors . "&lt;br /&gt;";&lt;br /&gt;echo $car2-&gt;wheelsdoors() . "&lt;br /&gt;";&lt;br /&gt;&lt;br /&gt;echo "Car parents:".get_parent_class('Car')."&lt;br /&gt;";&lt;br /&gt;echo "CompactCar parents:".get_parent_class('CompactCar')."&lt;br /&gt;";&lt;br /&gt;echo "&lt;br /&gt;";&lt;br /&gt;echo is_subclass_of('Car','Car')? 'true' : 'false';&lt;br /&gt;echo "&lt;br /&gt;";&lt;br /&gt;echo is_subclass_of('CompactCar','Car')? 'true' : 'false';&lt;br /&gt;echo "&lt;br /&gt;";&lt;br /&gt;echo is_subclass_of('Car','CompactCar')? 'true' : 'false';&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;?&gt;&lt;br /&gt;&lt;br /&gt;Source: www.webreference.com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-4672395120170004032?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/4672395120170004032/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/understanding-class-inheritance.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/4672395120170004032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/4672395120170004032'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/understanding-class-inheritance.html' title='Understanding Class Inheritance'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-3312743322125590408</id><published>2009-12-09T01:06:00.000+05:30</published><updated>2009-12-09T01:06:36.335+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>Would you initialize your strings with single quotes or double quotes?</title><content type='html'>Since the data inside the single-quoted string is not parsed for variable substitution, it’s always a better idea speed-wise to initialize a string with single quotes, unless  specifically need variable substitution.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-3312743322125590408?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/3312743322125590408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/would-you-initialize-your-strings-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/3312743322125590408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/3312743322125590408'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/would-you-initialize-your-strings-with.html' title='Would you initialize your strings with single quotes or double quotes?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-4424808849739009276</id><published>2009-12-09T01:04:00.001+05:30</published><updated>2009-12-09T01:06:36.335+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>What’s the special meaning of __sleep and __wakeup?</title><content type='html'>&lt;b&gt;__sleep&lt;/b&gt; returns the array of all the variables than need to be saved, &lt;br /&gt;while &lt;b&gt;__wakeup&lt;/b&gt; retrieves them.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-4424808849739009276?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/4424808849739009276/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/whats-special-meaning-of-sleep-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/4424808849739009276'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/4424808849739009276'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/whats-special-meaning-of-sleep-and.html' title='What’s the special meaning of __sleep and __wakeup?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-7036875288149623897</id><published>2009-12-09T01:03:00.000+05:30</published><updated>2009-12-09T01:06:45.613+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><category scheme='http://www.blogger.com/atom/ns#' term='MySQL Interview question'/><title type='text'>What are the differences between DROP a table and TRUNCATE a table</title><content type='html'>&lt;b&gt;DROP&lt;/b&gt; TABLE table_name - This will delete the table and its data. &lt;br /&gt;&lt;b&gt;TRUNCATE &lt;/b&gt;TABLE table_name - This will delete the data of the table, but not the table definition.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-7036875288149623897?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/7036875288149623897/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/what-are-differences-between-drop-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/7036875288149623897'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/7036875288149623897'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/what-are-differences-between-drop-table.html' title='What are the differences between DROP a table and TRUNCATE a table'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-9028893691000606089</id><published>2009-12-09T00:47:00.000+05:30</published><updated>2009-12-09T01:06:36.336+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><category scheme='http://www.blogger.com/atom/ns#' term='MySQL Interview question'/><title type='text'>How can we encrypt the username and password using PHP?</title><content type='html'>1)&lt;br /&gt;encrypt a password with the following Mysql&gt;SET PASSWORD=PASSWORD("Password");&lt;br /&gt;2)&lt;br /&gt;use the MySQL PASSWORD() function to encrypt username and password. For example, INSERT into user (password, ...) VALUES (PASSWORD($password)), ...);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-9028893691000606089?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/9028893691000606089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/how-can-we-encrypt-username-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/9028893691000606089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/9028893691000606089'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/how-can-we-encrypt-username-and.html' title='How can we encrypt the username and password using PHP?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-8619455548836257970</id><published>2009-12-09T00:44:00.000+05:30</published><updated>2009-12-09T00:44:54.308+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><category scheme='http://www.blogger.com/atom/ns#' term='MySQL Interview question'/><title type='text'>What is the difference between mysql_fetch_object and mysql_fetch_array?</title><content type='html'>&lt;b&gt;MySQL fetch object&lt;/b&gt; will collect first single matching record where mysql_fetch_array will collect all matching records from the table in an array&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-8619455548836257970?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/8619455548836257970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/what-is-difference-between.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/8619455548836257970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/8619455548836257970'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/what-is-difference-between.html' title='What is the difference between mysql_fetch_object and mysql_fetch_array?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-764051567884308603</id><published>2009-12-08T22:57:00.000+05:30</published><updated>2009-12-09T00:03:06.526+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP Interview Questions and Answers'/><title type='text'>Explain the differences between  echo, print and printf?</title><content type='html'>&lt;b&gt;Echo&lt;/b&gt; just outputs the contents following the construct to the screen. &lt;br /&gt;print is also a construct (so parentheses are optional when calling it), but it returns TRUE on successful output and FALSE if it was unable to print out the string. &lt;br /&gt;However, you can pass multiple parameters to echo, like:&lt;br /&gt;&lt;br /&gt;echo 'Welcome ', 'to', ' ', 'php mysql guide!';&lt;br /&gt;&lt;br /&gt;and it will output the string "Welcome to php mysql guide!" &lt;br /&gt;&lt;b&gt;print&lt;/b&gt; does not take multiple parameters.&lt;br /&gt;It is also generally argued that echo is faster, but usually the speed advantage is negligible, and might not be there for future versions of PHP.&lt;br /&gt;&lt;b&gt;printf&lt;/b&gt;  is a function, not a construct, and allows such advantages as formatted output, but it’s the slowest way to print out data out of echo, print and printf.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-764051567884308603?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/764051567884308603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/explain-differences-between-echo-print.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/764051567884308603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/764051567884308603'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/explain-differences-between-echo-print.html' title='Explain the differences between  echo, print and printf?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-3528062551444650014</id><published>2009-12-05T18:32:00.000+05:30</published><updated>2009-12-05T18:32:27.733+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Download PHP Script'/><title type='text'>Download usersonline script</title><content type='html'>&lt;a href="http://www.ziddu.com/download/7613712/usersonline.zip.html" target="_blank"&gt;Download usersonline script&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-3528062551444650014?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/3528062551444650014/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/download-usersonline-script.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/3528062551444650014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/3528062551444650014'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/download-usersonline-script.html' title='Download usersonline script'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-6759249859624624461</id><published>2009-12-05T18:30:00.001+05:30</published><updated>2009-12-05T18:32:27.733+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Download PHP Script'/><title type='text'>Download phpaffiliate script</title><content type='html'>&lt;a href="http://www.ziddu.com/download/7613701/phpaffiliate.zip.html" target="_blank"&gt;Download phpaffiliate script&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-6759249859624624461?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/6759249859624624461/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/download-phpaffiliate-script.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/6759249859624624461'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/6759249859624624461'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/download-phpaffiliate-script.html' title='Download phpaffiliate script'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-8930049244799334407</id><published>2009-12-05T18:21:00.000+05:30</published><updated>2009-12-05T18:21:21.612+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Download PHP Script'/><title type='text'>Download Hitcounter script</title><content type='html'>&lt;a href="http://www.ziddu.com/download/7613568/hitcounter.zip.html" target="_blank"&gt;Download Hit counter Script&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-8930049244799334407?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/8930049244799334407/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/download-hitcounter-script.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/8930049244799334407'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/8930049244799334407'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/download-hitcounter-script.html' title='Download Hitcounter script'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-1160496520881467240</id><published>2009-12-05T18:09:00.001+05:30</published><updated>2009-12-05T18:21:21.612+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Download PHP Script'/><title type='text'>Download Guest book script</title><content type='html'>&lt;a href="http://www.ziddu.com/download/7613458/guestbook.zip.html" target="_blank"&gt;Download Guest book script&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-1160496520881467240?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/1160496520881467240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/download-guest-book-script.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/1160496520881467240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/1160496520881467240'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/download-guest-book-script.html' title='Download Guest book script'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-3201978693221325439</id><published>2009-12-05T18:04:00.001+05:30</published><updated>2009-12-05T18:04:59.403+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Download PHP Script'/><title type='text'>Download greetings cards cript</title><content type='html'>&lt;a href="http://www.ziddu.com/download/7613441/gcards.zip.html" target="_blank"&gt;Download greetings Card&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-3201978693221325439?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/3201978693221325439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/download-greetings-cards-cript.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/3201978693221325439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/3201978693221325439'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/download-greetings-cards-cript.html' title='Download greetings cards cript'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-6446414136851678709</id><published>2009-12-05T17:58:00.001+05:30</published><updated>2009-12-05T17:58:57.113+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Download PHP Script'/><title type='text'>Download downloadcounter script</title><content type='html'>&lt;a href="http://www.ziddu.com/download/7613369/downloadcounter.zip.html" target="_blank"&gt;Download downloadcounter Script&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-6446414136851678709?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/6446414136851678709/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/download-downloadcounter-script.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/6446414136851678709'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/6446414136851678709'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/download-downloadcounter-script.html' title='Download downloadcounter script'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-7937055442314148909</id><published>2009-12-05T17:57:00.000+05:30</published><updated>2009-12-05T17:57:23.025+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Download PHP Script'/><title type='text'>Download dating script</title><content type='html'>&lt;a href="http://www.ziddu.com/download/7613354/datingscript.zip.html" target="_blank"&gt;Download dating script&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-7937055442314148909?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/7937055442314148909/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/download-dating-script.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/7937055442314148909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/7937055442314148909'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/download-dating-script.html' title='Download dating script'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-6203813803922631639</id><published>2009-12-05T17:55:00.001+05:30</published><updated>2009-12-05T17:55:49.019+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Download PHP Script'/><title type='text'>Download classifieds script</title><content type='html'>&lt;a href="http://www.ziddu.com/download/7613340/classifieds.zip.html" target="_blank"&gt;Download classifieds script&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-6203813803922631639?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/6203813803922631639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/download-classifieds-script.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/6203813803922631639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/6203813803922631639'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/download-classifieds-script.html' title='Download classifieds script'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-9217188966457061620</id><published>2009-12-05T17:52:00.001+05:30</published><updated>2009-12-05T17:55:49.020+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Download PHP Script'/><title type='text'>Download calendar script</title><content type='html'>&lt;a href="http://www.ziddu.com/download/7613317/calendar.zip.html" target="_blank"&gt;Download calender script&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-9217188966457061620?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/9217188966457061620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/download-calendar-script.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/9217188966457061620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/9217188966457061620'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/download-calendar-script.html' title='Download calendar script'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-883009462643061708</id><published>2009-12-05T17:50:00.000+05:30</published><updated>2009-12-05T17:50:31.242+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Download PHP Script'/><title type='text'>Download bookmarks script</title><content type='html'>&lt;a href="http://www.ziddu.com/download/7613299/bookmarks.zip.html" target="_blank"&gt;Download Bookmarks Script&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-883009462643061708?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/883009462643061708/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/download-bookmarks-script.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/883009462643061708'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/883009462643061708'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/download-bookmarks-script.html' title='Download bookmarks script'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-4693655699003947051</id><published>2009-12-05T17:46:00.000+05:30</published><updated>2009-12-05T17:47:15.372+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Download PHP Script'/><title type='text'>Download adrotator script</title><content type='html'>&lt;a href="http://www.ziddu.com/download/7613262/adrotator.zip.html" target="_blank"&gt;Download Adrotator Script&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-4693655699003947051?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/4693655699003947051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/download-adrotator-script.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/4693655699003947051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/4693655699003947051'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/download-adrotator-script.html' title='Download adrotator script'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-9137136009603316844</id><published>2009-12-05T17:43:00.000+05:30</published><updated>2009-12-05T17:45:02.005+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Download PHP Script'/><title type='text'>Download Oscommerce script</title><content type='html'>&lt;a href="http://www.ziddu.com/downloadlink/7613131/oscommerce-2.2ms2.tar.gz" target="_blank"&gt;Download Oscommerce Script&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-9137136009603316844?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/9137136009603316844/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/download-oscommerce-script.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/9137136009603316844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/9137136009603316844'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/download-oscommerce-script.html' title='Download Oscommerce script'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-3941983960857730492</id><published>2009-12-05T17:38:00.002+05:30</published><updated>2009-12-05T17:40:59.685+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><category scheme='http://www.blogger.com/atom/ns#' term='MySQL Interview question'/><title type='text'>Explain the difference between FLOAT, DOUBLE and REAL</title><content type='html'>&lt;b&gt;FLOATs&lt;/b&gt; store floating point numbers with 8 place accuracy and take up 4 bytes. &lt;b&gt;DOUBLEs&lt;/b&gt; store floating point numbers with 16 place accuracy and take up 8 bytes. REAL is a synonym of FLOAT for now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-3941983960857730492?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/3941983960857730492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/explain-difference-between-float-double.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/3941983960857730492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/3941983960857730492'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/explain-difference-between-float-double.html' title='Explain the difference between FLOAT, DOUBLE and REAL'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-3667118892491311508</id><published>2009-12-05T17:38:00.000+05:30</published><updated>2009-12-05T17:40:59.685+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><category scheme='http://www.blogger.com/atom/ns#' term='MySQL Interview question'/><title type='text'>Explain the difference between BOOL, TINYINT and BIT.</title><content type='html'>Prior to MySQL 5.0.3: those are all synonyms. After MySQL 5.0.3: BIT data type can store 8 bytes of data and should be used for binary data.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-3667118892491311508?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/3667118892491311508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/explain-difference-between-bool-tinyint.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/3667118892491311508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/3667118892491311508'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/explain-difference-between-bool-tinyint.html' title='Explain the difference between BOOL, TINYINT and BIT.'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-520886466973412731</id><published>2009-12-05T17:37:00.002+05:30</published><updated>2009-12-05T17:40:59.685+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><category scheme='http://www.blogger.com/atom/ns#' term='MySQL Interview question'/><title type='text'>What does myisamchk do?</title><content type='html'>It compressed the MyISAM tables, which reduces their disk usage.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-520886466973412731?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/520886466973412731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/what-does-myisamchk-do.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/520886466973412731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/520886466973412731'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/what-does-myisamchk-do.html' title='What does myisamchk do?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-5090661299369359094</id><published>2009-12-05T17:37:00.000+05:30</published><updated>2009-12-05T17:40:59.686+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><category scheme='http://www.blogger.com/atom/ns#' term='MySQL Interview question'/><title type='text'>Explain the difference between MyISAM Static and MyISAM Dynamic</title><content type='html'>&lt;b&gt;MyISAM&lt;/b&gt; static all the fields have fixed width. The Dynamic MyISAM table would include fields such as TEXT, BLOB, etc. to accommodate the data types with various lengths. MyISAM Static would be easier to restore in case of corruption, since even though you might lose some data, you know exactly where to look for the beginning of the next record.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-5090661299369359094?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/5090661299369359094/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/explain-difference-between-myisam.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/5090661299369359094'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/5090661299369359094'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/explain-difference-between-myisam.html' title='Explain the difference between MyISAM Static and MyISAM Dynamic'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5471776926780989448.post-6394124994315106368</id><published>2009-12-05T17:06:00.001+05:30</published><updated>2009-12-05T17:06:39.397+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><category scheme='http://www.blogger.com/atom/ns#' term='MySQL Interview question'/><title type='text'>How can we know the number of days between two given dates using MySQL?</title><content type='html'>SELECT DATEDIFF('2007-03-07','2005-01-01');&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5471776926780989448-6394124994315106368?l=php-mysql-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-mysql-guide.blogspot.com/feeds/6394124994315106368/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/how-can-we-know-number-of-days-between.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/6394124994315106368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5471776926780989448/posts/default/6394124994315106368'/><link rel='alternate' type='text/html' href='http://php-mysql-guide.blogspot.com/2009/12/how-can-we-know-number-of-days-between.html' title='How can we know the number of days between two given dates using MySQL?'/><author><name>Sandip</name><uri>http://www.blogger.com/profile/02074393398011459300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_UQRRCdOtSCM/S6YeUiPd0GI/AAAAAAAAAXw/segb1zhTBlY/S220/100_1283.jpg'/></author><thr:total>0</thr:total></entry></feed>
