<?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:blogger='http://schemas.google.com/blogger/2008' 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-5766888573580627794</id><updated>2025-01-04T11:15:38.611-08:00</updated><category term="PHP Script"/><category term="JQuery Plugin"/><category term="Tuts"/><category term="Ajax"/><category term="Templates"/><category term="Wordpress"/><title type='text'>Web Developer</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://wdeveloper.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://wdeveloper.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>27</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5766888573580627794.post-3587941317715358959</id><published>2011-06-05T19:22:00.000-07:00</published><updated>2011-06-05T19:25:29.654-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP Script"/><title type='text'>[PHP Script] Multi-level Comments</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-mhuIDb8yWEY/Tew5cmHIfzI/AAAAAAAAAn8/WcOThWJmgb8/s1600/359233.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-mhuIDb8yWEY/Tew5cmHIfzI/AAAAAAAAAn8/WcOThWJmgb8/s1600/359233.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;No specific knowledge of PHP require&lt;/li&gt;
&lt;li&gt;Easy to adapt in any existing homepage&lt;/li&gt;
&lt;li&gt;Fully customizable&lt;/li&gt;
&lt;li&gt;UI is fully controlled via CSS&lt;/li&gt;
&lt;li&gt;Admin module to accpet and delete comments&lt;/li&gt;
&lt;li&gt;Is compatible with php 4 and 5&lt;/li&gt;
&lt;li&gt;All browsers support&lt;/li&gt;
&lt;li&gt;Light weight&lt;/li&gt;
&lt;li&gt;Clean Coded&lt;/li&gt;
&lt;li&gt;Included Original PSD of bubble comments&lt;/li&gt;
&lt;/ul&gt;Demo &lt;a href=&quot;http://codecanyon.net/item/multilevel-comments/109293&quot;&gt;http://codecanyon.net/item/multilevel-comments/109293&lt;/a&gt;&lt;br /&gt;
&lt;h3&gt;&amp;nbsp;Download &lt;br /&gt;
&lt;br /&gt;
[PHP Script] Multi-level Comments&lt;/h3&gt;&lt;a href=&quot;http://www.mediafire.com/file/0dmsd1kxphgmgu1/wdeveloper.blogspot.com_Multi-level%20Comments.rar&quot;&gt;&amp;nbsp;http://www.mediafire.com/file/0dmsd1kxphgmgu1/wdeveloper.blogspot.com_Multi-level%20Comments.rar&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://wdeveloper.blogspot.com/feeds/3587941317715358959/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wdeveloper.blogspot.com/2011/06/php-script-multi-level-comments.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/3587941317715358959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/3587941317715358959'/><link rel='alternate' type='text/html' href='http://wdeveloper.blogspot.com/2011/06/php-script-multi-level-comments.html' title='[PHP Script] Multi-level Comments'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-mhuIDb8yWEY/Tew5cmHIfzI/AAAAAAAAAn8/WcOThWJmgb8/s72-c/359233.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5766888573580627794.post-5418525486450131216</id><published>2011-05-16T19:22:00.000-07:00</published><updated>2011-05-16T19:46:33.564-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP Script"/><title type='text'>[PHP Script] Vivvo CMS v4.5.1 Business</title><content type='html'>Link: &lt;a href=&quot;http://www.vivvo.net/whatsnew/&quot;&gt;http://www.vivvo.net/whatsnew/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Version: 4.5.1 (last version)&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-4Fwj6RAQ4X0/TdHheIxqZYI/AAAAAAAAAns/9Lz70Zpf4bw/s1600/Vivvo%2B4.5%2Bdemo.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;208&quot; src=&quot;http://2.bp.blogspot.com/-4Fwj6RAQ4X0/TdHheIxqZYI/AAAAAAAAAns/9Lz70Zpf4bw/s320/Vivvo%2B4.5%2Bdemo.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Download :&lt;br /&gt;
&lt;h3&gt;[PHP Script] Vivvo CMS v4.5.1 Business&lt;/h3&gt;&lt;a href=&quot;http://www.mediafire.com/file/6daimdo1p9o3gro/wdeveloper.blogspot.com_Vivvo%20CMS%20v4.5.1%20Business.rar&quot;&gt;http://www.mediafire.com/file/6daimdo1p9o3gro/wdeveloper.blogspot.com_Vivvo%20CMS%20v4.5.1%20Business.rar&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Live Demo: &lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.chinese.myvivvo.com/&quot;&gt;http://www.chinese.myvivvo.com&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.arabic.myvivvo.com/&quot;&gt;http://www.arabic.myvivvo.com&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.myvivvo.com/&quot;&gt;http://www.myvivvo.com&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://wdeveloper.blogspot.com/feeds/5418525486450131216/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wdeveloper.blogspot.com/2011/05/php-script-vivvo-cms-v451-business.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/5418525486450131216'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/5418525486450131216'/><link rel='alternate' type='text/html' href='http://wdeveloper.blogspot.com/2011/05/php-script-vivvo-cms-v451-business.html' title='[PHP Script] Vivvo CMS v4.5.1 Business'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-4Fwj6RAQ4X0/TdHheIxqZYI/AAAAAAAAAns/9Lz70Zpf4bw/s72-c/Vivvo%2B4.5%2Bdemo.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5766888573580627794.post-600367290868474194</id><published>2011-05-16T18:40:00.000-07:00</published><updated>2011-05-16T18:40:13.003-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP Script"/><title type='text'>[PHP Script] Advanced PHP Protection</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-EtPl_SmNdQY/TcwibdPGP8I/AAAAAAAAAng/TT0NsvKxTCQ/s1600/Advanced+PHP+Protection.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;324&quot; src=&quot;http://2.bp.blogspot.com/-EtPl_SmNdQY/TcwibdPGP8I/AAAAAAAAAng/TT0NsvKxTCQ/s640/Advanced+PHP+Protection.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Download&amp;nbsp; &lt;/div&gt;&lt;h3&gt;[PHP Script] Advanced PHP Protection&lt;/h3&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;http://www.mediafire.com/file/i6jc52d64yq11t2/wdeveloper.blogspot.com_advanced-php-protection-source.zip&quot;&gt;http://www.mediafire.com/file/i6jc52d64yq11t2/wdeveloper.blogspot.com_advanced-php-protection-source.zip&lt;/a&gt;&lt;/div&gt;Key Features:&lt;br /&gt;
Works with any .php file.&lt;br /&gt;
Custom password and brute force warning pages.&lt;br /&gt;
Well documented functions.&lt;br /&gt;
Can easily be integrated into a database set up with multiple users.&lt;br /&gt;
Single line mode, protect any page by simply including the file.&lt;br /&gt;
Passwords can be set as either a md5 of sha1 hash or plain text if you prefer.&lt;br /&gt;
Server side brute force protection, with options to change the maximum number of attempts and the block duration.&lt;br /&gt;
No database or installation required.&lt;br /&gt;
Email support provided.&lt;br /&gt;
Light weight.</content><link rel='replies' type='application/atom+xml' href='http://wdeveloper.blogspot.com/feeds/600367290868474194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wdeveloper.blogspot.com/2011/05/php-script-advanced-php-protection.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/600367290868474194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/600367290868474194'/><link rel='alternate' type='text/html' href='http://wdeveloper.blogspot.com/2011/05/php-script-advanced-php-protection.html' title='[PHP Script] Advanced PHP Protection'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-EtPl_SmNdQY/TcwibdPGP8I/AAAAAAAAAng/TT0NsvKxTCQ/s72-c/Advanced+PHP+Protection.jpg" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5766888573580627794.post-3605236911534769009</id><published>2011-05-12T11:20:00.000-07:00</published><updated>2011-05-13T13:41:08.995-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JQuery Plugin"/><title type='text'>[JQuery Plugin] li JQuery Slider/Image Rotator</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-4QA90ncCJjs/TcwlXy6XBRI/AAAAAAAAAnk/SHiWFrY_Nsk/s1600/preview.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;324&quot; src=&quot;http://2.bp.blogspot.com/-4QA90ncCJjs/TcwlXy6XBRI/AAAAAAAAAnk/SHiWFrY_Nsk/s640/preview.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Live Demo:&lt;br /&gt;
&lt;a href=&quot;http://codecanyon.net/item/li-jquery-sliderimage-rotator/full_screen_preview/153638&quot;&gt;http://codecanyon.net/item/li-jquery-sliderimage-rotator/full_screen_preview/153638&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Features&lt;br /&gt;
&lt;br /&gt;
Easy to Use and Modify – it is extremely easy to use powerful slider/banner image rotator. The slider size has to be defined only on ONE PLACE and to set the options and the images. Tweaking the skins gives you full control over the layout.&lt;br /&gt;
Multiple Sliders / Banners – you can have many slider/image rotators on single HTML page.&lt;br /&gt;
104 unique transitions – with more than 104 transitions and additional options per transition you can achieve amazing results. Also you can define the following transitions behavior: Regular, Regular-Custom, Random-Custom, Regular-Exception, Random-Exception.&lt;br /&gt;
Skinable – 12 different skins – each skin has its own folder and is extremely well commented, so any modifications to the buttons images, position and etc. is extremely simplified.&lt;br /&gt;
LightBox Support – with this options enabled when a slides has been clicked you can load bigger picture in modal mode. You only need to include link to .jpg/.png/.gif and LightBox enabled and the linked image will be displayed in Lightbox modal window activated.&lt;br /&gt;
PrettyPhoto Support - when a link is included and the link points to YouTube, Vimeo, an image or QuickTime move, li-slider automatically will recognize what is the link type and will display it in a modal window.&lt;br /&gt;
Youtube Support – through prettyPhoto modal dialog.&lt;br /&gt;
Vimeo Support – through prettyPhoto modal dialog.&lt;br /&gt;
QuickTime Support – through prettyPhoto modal dialog.&lt;br /&gt;
Repeat Slides / Continues Sliding – with this options you can tell the slider to repeat the slides infinitely, to play all slides once and stop or to repeat all the slides given number of times.&lt;br /&gt;
Define Transition per Slide – you can tell the slider to play certain slide with specific transition. Every time when that slide will be displayed with the transition defined by you.&lt;br /&gt;
Define Transition duration per Slide – you can define different display time for each slide.&lt;br /&gt;
Define single slide display time – you can define different display time for each slide.&lt;br /&gt;
GoToSlideOnStart Option – the banner will start rotating at the given starting slide.&lt;br /&gt;
Timer – shows how much has remained until the next slide is displayed. The position of the timer can be controlled through an option.&lt;br /&gt;
Pause onMouseOver – if the slider is in play mode and you move the mouse over the slider, this option if &quot;true&quot; pauses the slider.&lt;br /&gt;
Tooltip – when you hover the small slide buttons, a thumbnail will popup. If you use image the thumbnail will be automatically generated so you do not need to create the thumbnails. If set to text, use the alt property of the image to include the tooltip text. The alt tag supports HTML tags as well.&lt;br /&gt;
Tooltip Size – defines the tooltip width size in percents of the slider from 0 to 100. If you use text tooltip and have more text than the width allows, the tooltip will expand upward (this is changeable through the skins CSS )&lt;br /&gt;
Autoplay – on start.&lt;br /&gt;
Shuffle – randomize the slides order so every time a random slide will be displayed when the page is loaded.&lt;br /&gt;
Delay - how long each slide to be displayed/visible.&lt;br /&gt;
Transition Period - how long transition to last.&lt;br /&gt;
Vertical Sectors - how many columns one transition has.&lt;br /&gt;
Squares - how many rows one transition has.&lt;br /&gt;
Hyperlinks – this is global option for the links and it could be turned on or off. The links allows you to use property target=&quot;_blank&quot; to open the link in new tab/window.&lt;br /&gt;
Buttons Visibility – an option which allows you easily to hide all buttons.&lt;br /&gt;
Play/Pause buttons visibility – show or hide Play and Pause buttons.&lt;br /&gt;
Next/Previous buttons visibility – show or hide Next and Previous buttons through a single option.&lt;br /&gt;
Auto Hide – auto hide the buttons after certain amount of time if the mouse is not over the slider.&lt;br /&gt;
Buttons Hiding/Displaying Timing- with these four options you can control very precisely how fats or slow the navigation buttons will hide or show.&lt;br /&gt;
5 Public Methods – so you can control the slider from outside.&lt;br /&gt;
CSS Driven – the entire interface is purely CSS driven. This means that if you need to change the slider you do not need to tweak the JavaScript code.&lt;br /&gt;
iPhone/Smart Phone compatible – We’ve tested it. We’ve optimized slider. We made it versatile, so you know your content will be delivered to all devices and platforms.&lt;br /&gt;
Cross Browser Compatible – support all major browsers.&lt;br /&gt;
9 different animated GIF Slider Preloaders – There is nothing better than to aware the visitor that something will show up soon. The preloader will be visible until all the images included in the banner are loaded.&lt;br /&gt;
Unlimited number of images each with individual and adjustable tooltip, display duration, transition, transition duration and hyperlink.&lt;br /&gt;
&lt;br /&gt;
Download &lt;br /&gt;
&lt;h3&gt;[JQuery Plugin] li JQuery Slider/Image Rotator&lt;/h3&gt;&lt;div&gt;&lt;a href=&quot;http://www.mediafire.com/file/c4l62cd066x6ts6/wdeveloper.blogspot.com_li%20JQuery%20SliderImage%20Rotator.rar&quot;&gt;http://www.mediafire.com/file/c4l62cd066x6ts6/wdeveloper.blogspot.com_li%20JQuery%20SliderImage%20Rotator.rar&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wdeveloper.blogspot.com/feeds/3605236911534769009/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wdeveloper.blogspot.com/2011/05/jquery-plugin-li-jquery-sliderimage.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/3605236911534769009'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/3605236911534769009'/><link rel='alternate' type='text/html' href='http://wdeveloper.blogspot.com/2011/05/jquery-plugin-li-jquery-sliderimage.html' title='[JQuery Plugin] li JQuery Slider/Image Rotator'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-4QA90ncCJjs/TcwlXy6XBRI/AAAAAAAAAnk/SHiWFrY_Nsk/s72-c/preview.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5766888573580627794.post-3254990540935704759</id><published>2011-05-03T10:52:00.000-07:00</published><updated>2011-05-03T10:55:37.682-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JQuery Plugin"/><title type='text'>[Jquery Plugin] Lightbox evolution nonwp</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-gvTkka4RLa8/TcBBH6ohYOI/AAAAAAAAAnI/VVXT7Dbv1K4/s1600/lightbox.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;202&quot; src=&quot;http://3.bp.blogspot.com/-gvTkka4RLa8/TcBBH6ohYOI/AAAAAAAAAnI/VVXT7Dbv1K4/s400/lightbox.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Link demo :&amp;nbsp;&lt;a href=&quot;http://codecanyon.net/item/jquery-lightbox-evolution/full_screen_preview/115655&quot;&gt;http://codecanyon.net/item/jquery-lightbox-evolution/full_screen_preview/115655&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;Download jquery plugin Lightbox evolution nonwp&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.mediafire.com/file/bgm1198wpncg7ge/wdeveloper.blogspot.com-lightbox-evolution-nonwp.zip&quot;&gt;http://www.mediafire.com/file/bgm1198wpncg7ge/wdeveloper.blogspot.com-lightbox-evolution-nonwp.zip&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://wdeveloper.blogspot.com/feeds/3254990540935704759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wdeveloper.blogspot.com/2011/05/jquery-plugin-lightbox-evolution-nonwp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/3254990540935704759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/3254990540935704759'/><link rel='alternate' type='text/html' href='http://wdeveloper.blogspot.com/2011/05/jquery-plugin-lightbox-evolution-nonwp.html' title='[Jquery Plugin] Lightbox evolution nonwp'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-gvTkka4RLa8/TcBBH6ohYOI/AAAAAAAAAnI/VVXT7Dbv1K4/s72-c/lightbox.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5766888573580627794.post-5838100573304488139</id><published>2011-04-15T10:33:00.000-07:00</published><updated>2011-04-15T10:33:28.692-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Tuts"/><title type='text'>[TUT] A Deeper Look at Advanced Select Queries</title><content type='html'>&lt;div style=&quot;text-align: right;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-RwhguujyUXg/Tahs5_uuQZI/AAAAAAAAAlg/JqRy-zjnqTk/s1600/advanced_select_queries.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;http://2.bp.blogspot.com/-RwhguujyUXg/Tahs5_uuQZI/AAAAAAAAAlg/JqRy-zjnqTk/s200/advanced_select_queries.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt; A Deeper Look at Advanced Select Queries &lt;br /&gt;
By: John Cox &lt;br /&gt;
&lt;a href=&quot;http://net.tutsplus.com/tutorials/databases/a-deeper-look-at-advanced-select-queries-new-premium-tutorial/&quot;&gt;http://net.tutsplus.com/tutorials/databases/a-deeper-look-at-advanced-select-queries-new-premium-tutorial&lt;/a&gt;&lt;br /&gt;
To the SQL novice, joins can be intimidating and somewhat frustrating. Even when you think you have the query nailed, along comes an unexpected result which make you throw up your arms in surrender to the SQL gods. In this tutorial, we are going to build upon the excellent quick tip of &lt;a href=&quot;http://net.tutsplus.com/tutorials/databases/quick-tip-working-with-mysql-and-inner-join/&quot;&gt;working with MySQL and INNER JOIN&lt;/a&gt; recently posted and crack open the real power of a SELECT statement. &lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h2&gt;&amp;nbsp;&lt;/h2&gt;&lt;h2&gt;Tutorial Details&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Program: MySQL&lt;/li&gt;
&lt;li&gt;Difficulty: Moderate&lt;/li&gt;
&lt;li&gt;Estimated Completion Time: 20 Minutes &lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;h2&gt;&amp;nbsp;&lt;/h2&gt;&lt;h2&gt;Introduction&lt;/h2&gt;&lt;h2&gt;&lt;br /&gt;
&lt;/h2&gt;Think back to your earliest days of school where you were learning to group items, or learning basic math skills, or even how to spell. If your days of school were anything like mine, there were tons of exercises where there were pictures of things and you grouped those things together. It might have been ducks and cows, where you had to count each. It might have been word searches where you were given a block of seemingly random letters from which you had to find a list of words. You might remember &quot;Which one of these are not like the other&quot; game. &lt;br /&gt;
&lt;br /&gt;
These basic games that everyone learns in their earliest days of school is exactly the same skills that you use when you are working with SELECTs. We just have a different syntax that we have to use. Every time we use a SELECT command we are simply grouping a data set. Using JOINs we are simply grouping multiple data sets. We are finding ducks and cows that are either similar or different and pushing that off into an array that we can work with in our logic layer. It&#39;s the syntax that is confounding, but what we are doing is the same thing that we did in our very earliest days of school. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&quot;Every time we use a SELECT command we are simply grouping a data set. Using JOINs we are simply grouping multiple data sets. We are finding ducks and cows that are either similar or different and pushing that off into an array that we can work with in our logic layer. It&#39;s the syntax that is confounding...&quot; &lt;br /&gt;
&lt;br /&gt;
I am going to cover a few things in this tutorial, but none are extremely difficult to put into practice. I am using MySQL as my database, but for the most part I will be using simple SELECT syntax that should at least be familiar regardless of your flavor of SQL. For my query tool, I am using &lt;a href=&quot;http://www.sequelpro.com/&quot;&gt;Sequel Pro for Mac&lt;/a&gt; which is relatively fast and descriptive for my purposes today. I am using a very simple table structure of animal types, farms, and wild. For those playing along at home, the table structure looks something like this: &lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;--&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;--&amp;nbsp;Table&amp;nbsp;structure&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;table&amp;nbsp;`animal_types`&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;--&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;CREATE&amp;nbsp;TABLE&amp;nbsp;`animal_types`&amp;nbsp;(&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;`animal_type_id`&amp;nbsp;int(11)&amp;nbsp;NOT&amp;nbsp;NULL&amp;nbsp;AUTO_INCREMENT,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;`animal_type_description`&amp;nbsp;varchar(255)&amp;nbsp;NOT&amp;nbsp;NULL,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;PRIMARY&amp;nbsp;KEY&amp;nbsp;(`animal_type_id`)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;)&amp;nbsp;ENGINE=MyISAM&amp;nbsp;&amp;nbsp;DEFAULT&amp;nbsp;CHARSET=utf8&amp;nbsp;AUTO_INCREMENT=7&amp;nbsp;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;--&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;--&amp;nbsp;Dumping&amp;nbsp;data&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;table&amp;nbsp;`animal_types`&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;--&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;INSERT&amp;nbsp;INTO&amp;nbsp;`animal_types`&amp;nbsp;VALUES(1,&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;duck&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;INSERT&amp;nbsp;INTO&amp;nbsp;`animal_types`&amp;nbsp;VALUES(2,&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;cow&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;INSERT&amp;nbsp;INTO&amp;nbsp;`animal_types`&amp;nbsp;VALUES(3,&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;goose&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;INSERT&amp;nbsp;INTO&amp;nbsp;`animal_types`&amp;nbsp;VALUES(4,&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;cat&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;INSERT&amp;nbsp;INTO&amp;nbsp;`animal_types`&amp;nbsp;VALUES(5,&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;sheep&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;INSERT&amp;nbsp;INTO&amp;nbsp;`animal_types`&amp;nbsp;VALUES(6,&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;horse&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;--&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;--&amp;nbsp;Table&amp;nbsp;structure&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;table&amp;nbsp;`farm`&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;--&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;CREATE&amp;nbsp;TABLE&amp;nbsp;`farm`&amp;nbsp;(&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;`animal_id`&amp;nbsp;int(11)&amp;nbsp;NOT&amp;nbsp;NULL&amp;nbsp;AUTO_INCREMENT,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;`animal_type`&amp;nbsp;int(11)&amp;nbsp;NOT&amp;nbsp;NULL,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;`animal_description`&amp;nbsp;varchar(255)&amp;nbsp;NOT&amp;nbsp;NULL,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;`animal_name`&amp;nbsp;varchar(255)&amp;nbsp;NOT&amp;nbsp;NULL,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;PRIMARY&amp;nbsp;KEY&amp;nbsp;(`animal_id`)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;)&amp;nbsp;ENGINE=MyISAM&amp;nbsp;&amp;nbsp;DEFAULT&amp;nbsp;CHARSET=utf8&amp;nbsp;AUTO_INCREMENT=5&amp;nbsp;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;--&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;--&amp;nbsp;Dumping&amp;nbsp;data&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;table&amp;nbsp;`farm`&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;--&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;INSERT&amp;nbsp;INTO&amp;nbsp;`farm`&amp;nbsp;VALUES(1,&amp;nbsp;2,&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;spotted&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;Mal&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;INSERT&amp;nbsp;INTO&amp;nbsp;`farm`&amp;nbsp;VALUES(2,&amp;nbsp;4,&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;spotted&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;Zoe&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;INSERT&amp;nbsp;INTO&amp;nbsp;`farm`&amp;nbsp;VALUES(3,&amp;nbsp;1,&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;solid&amp;nbsp;color&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;Wash&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;INSERT&amp;nbsp;INTO&amp;nbsp;`farm`&amp;nbsp;VALUES(4,&amp;nbsp;2,&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;solid&amp;nbsp;color&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;Inara&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;--&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;--&amp;nbsp;Table&amp;nbsp;structure&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;table&amp;nbsp;`wild`&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;--&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;CREATE&amp;nbsp;TABLE&amp;nbsp;`wild`&amp;nbsp;(&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;`animal_id`&amp;nbsp;int(11)&amp;nbsp;NOT&amp;nbsp;NULL&amp;nbsp;AUTO_INCREMENT,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;`animal_type`&amp;nbsp;int(11)&amp;nbsp;NOT&amp;nbsp;NULL,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;`animal_description`&amp;nbsp;varchar(255)&amp;nbsp;NOT&amp;nbsp;NULL,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;`animal_name`&amp;nbsp;varchar(255)&amp;nbsp;NOT&amp;nbsp;NULL,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;PRIMARY&amp;nbsp;KEY&amp;nbsp;(`animal_id`)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;)&amp;nbsp;ENGINE=MyISAM&amp;nbsp;&amp;nbsp;DEFAULT&amp;nbsp;CHARSET=utf8&amp;nbsp;AUTO_INCREMENT=6&amp;nbsp;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;--&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;--&amp;nbsp;Dumping&amp;nbsp;data&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;table&amp;nbsp;`wild`&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;--&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;INSERT&amp;nbsp;INTO&amp;nbsp;`wild`&amp;nbsp;(`animal_id`,&amp;nbsp;`animal_type`,&amp;nbsp;`animal_description`,&amp;nbsp;`animal_name`)&amp;nbsp;VALUES(1,&amp;nbsp;2,&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;spotted&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;Jayne&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;INSERT&amp;nbsp;INTO&amp;nbsp;`wild`&amp;nbsp;(`animal_id`,&amp;nbsp;`animal_type`,&amp;nbsp;`animal_description`,&amp;nbsp;`animal_name`)&amp;nbsp;VALUES(2,&amp;nbsp;6,&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;solid&amp;nbsp;color&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;Kaylee&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;INSERT&amp;nbsp;INTO&amp;nbsp;`wild`&amp;nbsp;(`animal_id`,&amp;nbsp;`animal_type`,&amp;nbsp;`animal_description`,&amp;nbsp;`animal_name`)&amp;nbsp;VALUES(3,&amp;nbsp;1,&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;spotted&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;Simon&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;INSERT&amp;nbsp;INTO&amp;nbsp;`wild`&amp;nbsp;(`animal_id`,&amp;nbsp;`animal_type`,&amp;nbsp;`animal_description`,&amp;nbsp;`animal_name`)&amp;nbsp;VALUES(4,&amp;nbsp;3,&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;solid&amp;nbsp;color&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;River&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;INSERT&amp;nbsp;INTO&amp;nbsp;`wild`&amp;nbsp;(`animal_id`,&amp;nbsp;`animal_type`,&amp;nbsp;`animal_description`,&amp;nbsp;`animal_name`)&amp;nbsp;VALUES(5,&amp;nbsp;5,&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;solid&amp;nbsp;color&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;Sheppard&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;h2&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;&lt;h2&gt;&lt;span&gt;Back to Basics&lt;/span&gt;: Breaking the Shortcut Habit&lt;/h2&gt;&lt;h2&gt;&amp;nbsp;&lt;/h2&gt;&lt;br /&gt;
Since it is the syntax, and not necessarily the concepts that are difficult, we should take a couple of steps back and remember some of the basics. There are many different shortcuts that you can take in writing a SELECT, but many times those shortcuts will cause trouble down the line. I tend to write my queries out, so that I don&#39;t have ambiguous column names, and I can see exactly what I am expecting to get. &lt;br /&gt;
&lt;br /&gt;
Let&#39;s first start with my animal_types table which has a few animal types entered in. If I wanted to select everything in that table, I could write my select like so: &lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;SELECT&amp;nbsp;*&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;FROM&amp;nbsp;animal_types&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;br /&gt;
Which would give me a data set of:  &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-align: center;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-o7CPsuqzsFw/Tahs6Vp_73I/AAAAAAAAAlk/5IUYsA-zhDc/s1600/basics_1.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-o7CPsuqzsFw/Tahs6Vp_73I/AAAAAAAAAlk/5IUYsA-zhDc/s1600/basics_1.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
The problem with using the &quot; * &quot; selector is that a year from now I probably will not remember what I am expecting from this SELECT. Furthermore, when I am joining tables, I will probably have ambiguous column names, meaning there are multiple columns that have the same name, thus SQL has no way of setting the results apart. Instead, let&#39;s be specific, which takes just a little more typing, but corrects some of these problems with taking shortcuts: &lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;SELECT&amp;nbsp;animal_type_id,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;animal_type_description&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;FROM&amp;nbsp;animal_types&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
Which gives the exact data set back, but I see exactly what I should be getting back:  &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-j93jENX8yOQ/Tahs6wUsM7I/AAAAAAAAAlo/fuLFXAIZvBk/s1600/basics_2.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-j93jENX8yOQ/Tahs6wUsM7I/AAAAAAAAAlo/fuLFXAIZvBk/s1600/basics_2.png&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Even though we are explicitly naming our column names, we can go just a little bit further, and that is explicitly saying these columns belong to this table. This is another shortcut that we take all the time, which adds just a little more time to writing queries, but ends up saving the debugging time later when you are joining other tables. Instead of our last query, let&#39;s instead explicitly prefix our columns with a table prefix: &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;SELECT&amp;nbsp;att.animal_type_id,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;att.animal_type_description&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;FROM&amp;nbsp;animal_types&amp;nbsp;att&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
We have added the prefix on the table animal_types of att, which tells SQL, when you see the prefix of u, realize that it belongs to the table named animal_types. Our data set looks exactly the same again:  &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-0y3ayp8zxRw/Tahs7AzPWUI/AAAAAAAAAls/dgfXJcFXpX8/s1600/basics_3.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-0y3ayp8zxRw/Tahs7AzPWUI/AAAAAAAAAls/dgfXJcFXpX8/s1600/basics_3.png&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
Let&#39;s also tell SQL what to name our columns when it gives us our results. Many times when you are working with JOINs or other advanced queries, two columns will have the same name, which makes it difficult to distinguish in your logic layer. I like to explicitly tell SQL to deliver my column names in the manner that I want, and not necessarily as they are named. To do this, we are going to use the AS keyword: &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;SELECT&amp;nbsp;att.animal_type_id&amp;nbsp;AS&amp;nbsp;animal_type_id,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;att.animal_type_description&amp;nbsp;AS&amp;nbsp;animal_type_description&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;FROM&amp;nbsp;animal_types&amp;nbsp;att&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;br /&gt;
Which again gives us the exact same data set but we have again been even more explicit in our query:&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-av2lvWW9YOM/Tahs7uaVmEI/AAAAAAAAAlw/puk1Obknwqs/s1600/basics_4.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-av2lvWW9YOM/Tahs7uaVmEI/AAAAAAAAAlw/puk1Obknwqs/s1600/basics_4.png&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
There is one more way to be sure that I am telling SQL to SELECT exactly what I want, and from where I want, and that is to add the database prefix onto my table. Programming languages and different tools make it very easy for the database name to be implied, but there are times where you might call a different database in a query. When you add the database prefix you take the implication of working with a single database out of the mix.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;SELECT att.animal_type_id AS animal_type_id,
       att.animal_type_description AS animal_type_description

FROM tutorial.animal_types att&lt;/pre&gt;&lt;br /&gt;
Again, exact same data set:  &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-Y1IMt9j709Y/Tahs8DLGKeI/AAAAAAAAAl0/mL-oROyDJus/s1600/basics_5.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-Y1IMt9j709Y/Tahs8DLGKeI/AAAAAAAAAl0/mL-oROyDJus/s1600/basics_5.png&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
Except now we are telling SQL to explicitly look in the database &quot;tutorial&quot; for the table &quot;animal_types&quot;. Again, this comes in handy when we are pulling information from multiple databases into a single select. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;&lt;span&gt;Sub-Selects&lt;/span&gt;: Multiple Selects Bundled Together&lt;/h2&gt;&lt;h2&gt;&amp;nbsp;&lt;/h2&gt;MySQL 4.1 added the ability to use Sub-Selects. A word of caution on Sub-Selects before we get too deep into them, use them wisely. The execution plan for Sub-Selects may well be much different than you would imagine, and thus when you believe that you are using an INDEX, you are really working with a full table scan. In my experience, you can optimize your Sub-Selects to be just as performance friendly as a natural join, but when you are dealing with optimization you will want to pay close attention to the EXPLAIN results on your query. For more information, &lt;a href=&quot;http://net.tutsplus.com/tutorials/databases/profiling-mysql-queries-with-phpmyadmin-new-premium-tutorial/&quot;&gt; take a look at a recent MySQL optimization tutorial&lt;/a&gt; which gives you insight on the query execution plans. &lt;br /&gt;
&lt;br /&gt;
What a Sub-Select is basically executing a SELECT statement within a SELECT statement. Let&#39;s take a look at a very common use: &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;SELECT&amp;nbsp;f.animal_id&amp;nbsp;AS&amp;nbsp;animal_id,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_type&amp;nbsp;AS&amp;nbsp;animal_type,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_description&amp;nbsp;AS&amp;nbsp;animal_description,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_name&amp;nbsp;AS&amp;nbsp;animal_name&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;FROM&amp;nbsp;tutorial.farm&amp;nbsp;f&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;WHERE&amp;nbsp;f.animal_type&amp;nbsp;IN&amp;nbsp;(SELECT&amp;nbsp;att.animal_type_id&amp;nbsp;FROM&amp;nbsp;tutorial.animal_types&amp;nbsp;att&amp;nbsp;where&amp;nbsp;att.animal_type_id&amp;nbsp;=&amp;nbsp;2)&amp;nbsp; &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;br /&gt;
Which gives us a data set of:  &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-exCx5PfQe0Y/Tahs8psWYqI/AAAAAAAAAl4/j1paHXHf_Kk/s1600/combine_1.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-exCx5PfQe0Y/Tahs8psWYqI/AAAAAAAAAl4/j1paHXHf_Kk/s1600/combine_1.png&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
In this case we are saying to return all farm animals that have are of an animal type 2. Let&#39;s build on this just a bit, and instead look for animal type 1 or 2. &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;SELECT&amp;nbsp;f.animal_id&amp;nbsp;AS&amp;nbsp;animal_id,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_type&amp;nbsp;AS&amp;nbsp;animal_type,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_description&amp;nbsp;AS&amp;nbsp;animal_description,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_name&amp;nbsp;AS&amp;nbsp;animal_name&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;FROM&amp;nbsp;tutorial.farm&amp;nbsp;f&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;WHERE&amp;nbsp;f.animal_type&amp;nbsp;IN&amp;nbsp;(SELECT&amp;nbsp;att.animal_type_id&amp;nbsp;FROM&amp;nbsp;tutorial.animal_types&amp;nbsp;att&amp;nbsp;where&amp;nbsp;att.animal_type_id&amp;nbsp;=&amp;nbsp;2&amp;nbsp;OR&amp;nbsp;att.animal_type_id&amp;nbsp;=&amp;nbsp;1)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
Which now gives us a result of:&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-F569npx8gIk/TahtCEhP5qI/AAAAAAAAAmo/V06kFkhp2kc/s1600/ss_2.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-F569npx8gIk/TahtCEhP5qI/AAAAAAAAAmo/V06kFkhp2kc/s1600/ss_2.png&quot; style=&quot;cursor: move;&quot; /&gt;&lt;/a&gt;&lt;/span&gt;We are using the IN keyword to tell SQL to look at the results from our Sub-Select. In this case, we could easily rewrite this to not use a Sub-Select and get the same results: &lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;SELECT&amp;nbsp;f.animal_id&amp;nbsp;AS&amp;nbsp;animal_id,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_type&amp;nbsp;AS&amp;nbsp;animal_type,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_description&amp;nbsp;AS&amp;nbsp;animal_description,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_name&amp;nbsp;AS&amp;nbsp;animal_name&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;FROM&amp;nbsp;tutorial.farm&amp;nbsp;f&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;WHERE&amp;nbsp;f.animal_type&amp;nbsp;IN&amp;nbsp;(1,&amp;nbsp;2) &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;br /&gt;
Exact same results as before:  &lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-align: center;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-F569npx8gIk/TahtCEhP5qI/AAAAAAAAAmo/V06kFkhp2kc/s1600/ss_2.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-align: center;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-7rl7XucwsEY/TahtCk2QEyI/AAAAAAAAAms/y2g3CtGLB2M/s1600/ss_3.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-7rl7XucwsEY/TahtCk2QEyI/AAAAAAAAAms/y2g3CtGLB2M/s1600/ss_3.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
However, when we change our Sub-Select to be something like: &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;SELECT&amp;nbsp;f.animal_id&amp;nbsp;AS&amp;nbsp;animal_id,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_type&amp;nbsp;AS&amp;nbsp;animal_type,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_description&amp;nbsp;AS&amp;nbsp;animal_description,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_name&amp;nbsp;AS&amp;nbsp;animal_name&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;FROM&amp;nbsp;tutorial.farm&amp;nbsp;f&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;WHERE&amp;nbsp;f.animal_type&amp;nbsp;IN&amp;nbsp;(SELECT&amp;nbsp;att.animal_type_id&amp;nbsp;FROM&amp;nbsp;tutorial.animal_types&amp;nbsp;att&amp;nbsp;where&amp;nbsp;att.animal_type_description&amp;nbsp;LIKE&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;%duck%&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;OR&amp;nbsp;att.animal_type_description&amp;nbsp;LIKE&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;%cow%&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;)&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
We begin to see the power:&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-align: center;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-VBTGiRNM3fk/TahtDG_vZPI/AAAAAAAAAmw/3wIUWc4-ngw/s1600/ss_4.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-VBTGiRNM3fk/TahtDG_vZPI/AAAAAAAAAmw/3wIUWc4-ngw/s1600/ss_4.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
We can use a Sub-Select to search and give us a data set to limit our farm results. We can take this just a bit further by also using a Sub-Select in our query SELECT. Say for instance that we want to get the animal_type_description as a Sub-Select in our main query: &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;SELECT&amp;nbsp;f.animal_id&amp;nbsp;AS&amp;nbsp;animal_id,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_type&amp;nbsp;AS&amp;nbsp;animal_type,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_description&amp;nbsp;AS&amp;nbsp;animal_description,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_name&amp;nbsp;AS&amp;nbsp;animal_name,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(SELECT&amp;nbsp;att.animal_type_description&amp;nbsp;FROM&amp;nbsp;tutorial.animal_types&amp;nbsp;att&amp;nbsp;where&amp;nbsp;att.animal_type_id&amp;nbsp;=&amp;nbsp;f.animal_type)&amp;nbsp;AS&amp;nbsp;description&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;FROM&amp;nbsp;tutorial.farm&amp;nbsp;f&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;WHERE&amp;nbsp;f.animal_type&amp;nbsp;IN&amp;nbsp;(SELECT&amp;nbsp;att.animal_type_id&amp;nbsp;FROM&amp;nbsp;tutorial.animal_types&amp;nbsp;att&amp;nbsp;where&amp;nbsp;att.animal_type_description&amp;nbsp;LIKE&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;%duck%&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;OR&amp;nbsp;att.animal_type_description&amp;nbsp;LIKE&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;%cow%&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;/div&gt;Which returns:  &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-UoFUQo1tGlM/TahtDW63vOI/AAAAAAAAAm0/jn4-jI-Pzxg/s1600/ss_5.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-UoFUQo1tGlM/TahtDW63vOI/AAAAAAAAAm0/jn4-jI-Pzxg/s1600/ss_5.png&quot; style=&quot;cursor: move;&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-align: center;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
In this query we are placing a condition on our Sub-Select to return the animal_type_description when it matches the f.animal_id. This condition will last for this pass, and will be reset on the next data set. Basically, we have joined our tables together by simply using a Sub-Select. Again, re-read the caution from the beginning of this section on the performance, but as you can see you can use a Sub-Select to quickly join a table based on a condition performed in the Sub-Select. &lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;&lt;h2&gt;&lt;span&gt;INNER JOINS&lt;/span&gt;: The Exclusive Club&lt;/h2&gt;&lt;h2&gt;&lt;br /&gt;
&lt;/h2&gt;With Sub-Selects out of the way, let&#39;s get to an INNER JOIN. I have always seen joins taught with nice looking circles which show where the JOIN is selecting. I would rather think of joins in a more natural learning way which I learned in grade school of grouping pictures. I always visualize what I am wanting to get from my query before I write it. When I visualize an exclusive relationship, that&#39;s when I use an INNER JOIN. &lt;br /&gt;
&lt;br /&gt;
For instance, let&#39;s say that I want to see the animal type description for my farm animals, but only when an animal type id exists. I could write an INNER JOIN that would return this result: &lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;SELECT&amp;nbsp;f.animal_id&amp;nbsp;AS&amp;nbsp;farm_animal_id,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_type&amp;nbsp;AS&amp;nbsp;farm_animal_type,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_description&amp;nbsp;AS&amp;nbsp;farm_animal_description,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_name&amp;nbsp;AS&amp;nbsp;farm_animal_name,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;att.animal_type_description&amp;nbsp;AS&amp;nbsp;description&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;FROM&amp;nbsp;tutorial.farm&amp;nbsp;f&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;INNER&amp;nbsp;JOIN&amp;nbsp;tutorial.animal_types&amp;nbsp;att&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;ON&amp;nbsp;f.animal_type&amp;nbsp;=&amp;nbsp;att.animal_type_id;&amp;nbsp; &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;Which returns:&amp;nbsp; &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-OS7hwR7c-rw/Tahs-tDQDOI/AAAAAAAAAmI/xmX1i6B2iLo/s1600/inner_1.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-OS7hwR7c-rw/Tahs-tDQDOI/AAAAAAAAAmI/xmX1i6B2iLo/s1600/inner_1.png&quot; style=&quot;cursor: move;&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
Awesome. That said, this example does not show the exclusivity that we get from our INNER JOIN. Let&#39;s do something that happens every day with our data structure and delete an entry from our definition look up table, animal types. I am going to delete the &quot;cat&quot; description: &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;DELETE&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;FROM&amp;nbsp;animal_types&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;WHERE&amp;nbsp;animal_type_description&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;cat&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;And now I want to re-run my original query:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;SELECT&amp;nbsp;f.animal_id&amp;nbsp;AS&amp;nbsp;farm_animal_id,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_type&amp;nbsp;AS&amp;nbsp;farm_animal_type,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_description&amp;nbsp;AS&amp;nbsp;farm_animal_description,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_name&amp;nbsp;AS&amp;nbsp;farm_animal_name,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;att.animal_type_description&amp;nbsp;AS&amp;nbsp;description&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;FROM&amp;nbsp;tutorial.farm&amp;nbsp;f&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;INNER&amp;nbsp;JOIN&amp;nbsp;tutorial.animal_types&amp;nbsp;att&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;ON&amp;nbsp;f.animal_type&amp;nbsp;=&amp;nbsp;att.animal_type_id;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;Which now only returns three results:&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-align: center;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-LeaNQzvJrGw/Tahs_JXy-4I/AAAAAAAAAmM/sW7MO1gjb_M/s1600/inner_2.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-LeaNQzvJrGw/Tahs_JXy-4I/AAAAAAAAAmM/sW7MO1gjb_M/s1600/inner_2.png&quot; /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-E5TW_9exC1g/TahtAENa9rI/AAAAAAAAAmU/3XeBqT0o6xc/s1600/inner_4.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-jW5q3DuKpCw/Tahs_iyn1iI/AAAAAAAAAmQ/czYo0KnpoUo/s1600/inner_3.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
All I have done is removed an attribute from my look-up table, and &quot;Zoe&quot; is still in my farm animals table:&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;SELECT&amp;nbsp;f.animal_name&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;name&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;FROM&amp;nbsp;tutorial.farm&amp;nbsp;f&amp;nbsp; &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&amp;nbsp; &lt;br /&gt;
&lt;a href=&quot;http://2.bp.blogspot.com/-jW5q3DuKpCw/Tahs_iyn1iI/AAAAAAAAAmQ/czYo0KnpoUo/s1600/inner_3.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-jW5q3DuKpCw/Tahs_iyn1iI/AAAAAAAAAmQ/czYo0KnpoUo/s1600/inner_3.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
But since there is not a match in my animal types table, I will not get a result from my farm animals. &lt;br /&gt;
&lt;br /&gt;
Let&#39;s play the matching game with our wild animals table to test the concept a little more: &lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;SELECT&amp;nbsp;w.animal_id&amp;nbsp;AS&amp;nbsp;wild_animal_id,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;w.animal_type&amp;nbsp;AS&amp;nbsp;wild_animal_type,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;w.animal_description&amp;nbsp;AS&amp;nbsp;wild_animal_description,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;w.animal_name&amp;nbsp;AS&amp;nbsp;wild_animal_name,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;att.animal_type_description&amp;nbsp;AS&amp;nbsp;description&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;FROM&amp;nbsp;tutorial.wild&amp;nbsp;w&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;INNER&amp;nbsp;JOIN&amp;nbsp;tutorial.animal_types&amp;nbsp;att&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;ON&amp;nbsp;w.animal_type&amp;nbsp;=&amp;nbsp;att.animal_type_id&amp;nbsp; &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;Which gives us a result of:&amp;nbsp; &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-align: center;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-E5TW_9exC1g/TahtAENa9rI/AAAAAAAAAmU/3XeBqT0o6xc/s1600/inner_4.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-E5TW_9exC1g/TahtAENa9rI/AAAAAAAAAmU/3XeBqT0o6xc/s1600/inner_4.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
Again, always remember an INNER JOIN is going to return data from two tables where there is a match in both of the tables. When you compare two pictures and make a single picture from the two, you will only be drawing the matches. &lt;br /&gt;
&lt;h2&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;&lt;h2&gt;&lt;span&gt;OUTER JOINS&lt;/span&gt;: The Descriptive Club&lt;/h2&gt;&lt;h2&gt;&amp;nbsp;&lt;/h2&gt;INNER JOINs are easy to use, but can be limiting. There are two types of joins with MySQL which do not have the exclusivity rules, and they are LEFT OUTER JOIN and RIGHT OUTER JOIN. Other SQL databases also have a FULL OUTER JOIN, which you can simulate in MySQL with a UNION. I tend to exclusively use LEFT OUTER JOINs, as I think of my OUTER JOINS as adding description to my SELECT statements. &lt;br /&gt;
&lt;br /&gt;
When you are using a LEFT OUTER JOIN you are basically saying, get me everything from the LEFT table and join anything that matches the condition from the RIGHT table non-exclusively: &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;div style=&quot;margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;SELECT&amp;nbsp;f.animal_id&amp;nbsp;AS&amp;nbsp;farm_animal_id,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_type&amp;nbsp;AS&amp;nbsp;farm_animal_type,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_description&amp;nbsp;AS&amp;nbsp;farm_animal_description,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_name&amp;nbsp;AS&amp;nbsp;farm_animal_name,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;att.animal_type_description&amp;nbsp;AS&amp;nbsp;description&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;FROM&amp;nbsp;tutorial.farm&amp;nbsp;f&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;LEFT&amp;nbsp;OUTER&amp;nbsp;JOIN&amp;nbsp;tutorial.animal_types&amp;nbsp;att&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;ON&amp;nbsp;f.animal_type&amp;nbsp;=&amp;nbsp;att.animal_type_id&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Gives us a result of: &lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-align: center;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-jyn3XvG1kUU/TahtAemKErI/AAAAAAAAAmY/QY5lGDzOtiM/s1600/outer_1.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-jyn3XvG1kUU/TahtAemKErI/AAAAAAAAAmY/QY5lGDzOtiM/s1600/outer_1.png&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
&lt;br /&gt;
Our farm table is our LEFT table as that is where my natural selection comes from, and it will always return a result from the LEFT table, even when there is nothing that matches from our RIGHT table. Let&#39;s take a look at an example of a RIGHT OUTER JOIN using the same basic SELECT: &lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;SELECT&amp;nbsp;f.animal_id&amp;nbsp;AS&amp;nbsp;farm_animal_id,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_type&amp;nbsp;AS&amp;nbsp;farm_animal_type,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_description&amp;nbsp;AS&amp;nbsp;farm_animal_description,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_name&amp;nbsp;AS&amp;nbsp;farm_animal_name,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;att.animal_type_description&amp;nbsp;AS&amp;nbsp;description&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;FROM&amp;nbsp;tutorial.farm&amp;nbsp;f&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;RIGHT&amp;nbsp;OUTER&amp;nbsp;JOIN&amp;nbsp;tutorial.animal_types&amp;nbsp;att&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;ON&amp;nbsp;f.animal_type&amp;nbsp;=&amp;nbsp;att.animal_type_id &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;br /&gt;
Which gives us a result of:&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-ZhVhBDP4pOw/TahtA_ZwvsI/AAAAAAAAAmc/Ukzh0DcDN7U/s1600/outer_2.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-ZhVhBDP4pOw/TahtA_ZwvsI/AAAAAAAAAmc/Ukzh0DcDN7U/s1600/outer_2.png&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Which in my mind is not nearly as useful as a data set, because I end up will NULL entries in my LEFT data set. When I write a query, I generally want to know everything in my LEFT without those nasty NULL entries to deal with. Where OUTER JOINS really come in handy is when we are joining multiple tables together to build upon the information. Lets add a new look up table to the mix for our descriptions of whether the animal is striped, spotted or solid: &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;--&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;--&amp;nbsp;Table&amp;nbsp;structure&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;table&amp;nbsp;`animal_descriptions`&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;--&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;CREATE&amp;nbsp;TABLE&amp;nbsp;`animal_descriptions`&amp;nbsp;(&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;`animal_description_id`&amp;nbsp;int(11)&amp;nbsp;NOT&amp;nbsp;NULL&amp;nbsp;AUTO_INCREMENT,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;`animal_description`&amp;nbsp;varchar(255)&amp;nbsp;NOT&amp;nbsp;NULL,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;PRIMARY&amp;nbsp;KEY&amp;nbsp;(`animal_description_id`)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;)&amp;nbsp;ENGINE=MyISAM&amp;nbsp;&amp;nbsp;DEFAULT&amp;nbsp;CHARSET=utf8&amp;nbsp;AUTO_INCREMENT=4&amp;nbsp;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;--&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;--&amp;nbsp;Dumping&amp;nbsp;data&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;table&amp;nbsp;`animal_descriptions`&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;--&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;INSERT&amp;nbsp;INTO&amp;nbsp;`animal_descriptions`&amp;nbsp;VALUES(1,&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;Spotted&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;INSERT&amp;nbsp;INTO&amp;nbsp;`animal_descriptions`&amp;nbsp;VALUES(2,&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;Striped&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;INSERT&amp;nbsp;INTO&amp;nbsp;`animal_descriptions`&amp;nbsp;VALUES(3,&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;Solid&amp;nbsp;Color&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;And after I change the values in my farm and wild tables to integers to match my description ids, I can then make multiple OUTER joins on my original query:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;SELECT&amp;nbsp;f.animal_id&amp;nbsp;AS&amp;nbsp;farm_animal_id,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_type&amp;nbsp;AS&amp;nbsp;farm_animal_type,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;d.animal_description&amp;nbsp;AS&amp;nbsp;farm_animal_description,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_name&amp;nbsp;AS&amp;nbsp;farm_animal_name,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;att.animal_type_description&amp;nbsp;AS&amp;nbsp;description&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;FROM&amp;nbsp;tutorial.farm&amp;nbsp;f&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;LEFT&amp;nbsp;OUTER&amp;nbsp;JOIN&amp;nbsp;tutorial.animal_types&amp;nbsp;att&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;ON&amp;nbsp;f.animal_type&amp;nbsp;=&amp;nbsp;att.animal_type_id&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;LEFT&amp;nbsp;OUTER&amp;nbsp;JOIN&amp;nbsp;tutorial.animal_descriptions&amp;nbsp;d&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;on&amp;nbsp;f.animal_description&amp;nbsp;=&amp;nbsp;d.animal_description_id&amp;nbsp; &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
We are saying give me all farm animal names, and while you are at it, give me the type of animal it is, as well as the description of the animal, even when there might not be a match for the farm animal in the RIGHT tables:&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-02Z7sAfSz88/TahtBZc9csI/AAAAAAAAAmg/p3pEThP1Q7A/s1600/outer_3.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-02Z7sAfSz88/TahtBZc9csI/AAAAAAAAAmg/p3pEThP1Q7A/s1600/outer_3.png&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Bam! We have what we are after. The only limit to a join is your imagination and the performance of your database server. The more that you normalize, the more that you will probably have the need to add non-exclusive description to you results. &lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;&lt;h2&gt;&lt;span&gt;Combining JOINS&lt;/span&gt;: Mix and Match&lt;/h2&gt;&lt;h2&gt;&lt;br /&gt;
&lt;/h2&gt;There are times where you need exclusivity on a join, but want description from another join. There is no law (except in Iceland, parts of Nova Scotia, and Eastern Kentucky) that states that you can not use both INNER joins and OUTER joins in the same SELECT. Let&#39;s take a look at our wild animals for a moment:&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-wio19CLsjz0/TahtBz7TndI/AAAAAAAAAmk/9M1q-uExIiY/s1600/ss_1.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-wio19CLsjz0/TahtBz7TndI/AAAAAAAAAmk/9M1q-uExIiY/s1600/ss_1.png&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
We have one animal that is striped. Let&#39;s remove striped from our new animal description table, and then just use LEFT OUTER JOINs to simulate our last example from the wild side: &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;DELETE&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;FROM&amp;nbsp;tutorial.animal_descriptions&amp;nbsp;where&amp;nbsp;animal_description_id&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;1&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;And to select from our wild animals just as we did our farm animals:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;SELECT&amp;nbsp;w.animal_id&amp;nbsp;AS&amp;nbsp;wild_animal_id,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;w.animal_type&amp;nbsp;AS&amp;nbsp;wild_animal_type,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;d.animal_description&amp;nbsp;AS&amp;nbsp;farm_animal_description,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;w.animal_name&amp;nbsp;AS&amp;nbsp;wild_animal_name,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;att.animal_type_description&amp;nbsp;AS&amp;nbsp;description&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;FROM&amp;nbsp;tutorial.wild&amp;nbsp;w&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;LEFT&amp;nbsp;OUTER&amp;nbsp;JOIN&amp;nbsp;tutorial.animal_types&amp;nbsp;att&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;ON&amp;nbsp;w.animal_type&amp;nbsp;=&amp;nbsp;att.animal_type_id&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;LEFT&amp;nbsp;OUTER&amp;nbsp;JOIN&amp;nbsp;tutorial.animal_descriptions&amp;nbsp;d&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;on&amp;nbsp;w.animal_description&amp;nbsp;=&amp;nbsp;d.animal_description_id&amp;nbsp; &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Which gives us a NULL value where our Striped animal description used to be:&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-YqxO5h8adKI/Tahs9LPVtfI/AAAAAAAAAl8/KUzitmRcwAc/s1600/combine_2.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-YqxO5h8adKI/Tahs9LPVtfI/AAAAAAAAAl8/KUzitmRcwAc/s1600/combine_2.png&quot; /&gt;&lt;/a&gt;&lt;/span&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-F569npx8gIk/TahtCEhP5qI/AAAAAAAAAmo/V06kFkhp2kc/s1600/ss_2.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
That&#39;s all well and good, until you realize that your data structure is no longer intact because of that NULL value. Let&#39;s combine our OUTER join description with the exclusivity of an INNER JOIN on our description: &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;SELECT&amp;nbsp;w.animal_id&amp;nbsp;AS&amp;nbsp;wild_animal_id,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;w.animal_type&amp;nbsp;AS&amp;nbsp;wild_animal_type,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;d.animal_description&amp;nbsp;AS&amp;nbsp;farm_animal_description,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;w.animal_name&amp;nbsp;AS&amp;nbsp;wild_animal_name,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;att.animal_type_description&amp;nbsp;AS&amp;nbsp;description&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;FROM&amp;nbsp;tutorial.wild&amp;nbsp;w&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;LEFT&amp;nbsp;OUTER&amp;nbsp;JOIN&amp;nbsp;tutorial.animal_types&amp;nbsp;att&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;ON&amp;nbsp;w.animal_type&amp;nbsp;=&amp;nbsp;att.animal_type_id&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;INNER&amp;nbsp;JOIN&amp;nbsp;tutorial.animal_descriptions&amp;nbsp;d&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;on&amp;nbsp;w.animal_description&amp;nbsp;=&amp;nbsp;d.animal_description_id&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;/div&gt;&lt;br /&gt;
Which gets rid of that NULL value, which might be the difference of a bug in your application because of a data integrity issue, and peace and quiet on the weekend:&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-7rl7XucwsEY/TahtCk2QEyI/AAAAAAAAAms/y2g3CtGLB2M/s1600/ss_3.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-ZWqS5HJlCPA/Tahs9tOREJI/AAAAAAAAAmA/wa_ds_Bvtwc/s1600/combine_3.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-ZWqS5HJlCPA/Tahs9tOREJI/AAAAAAAAAmA/wa_ds_Bvtwc/s1600/combine_3.png&quot; style=&quot;cursor: move;&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
We can also self join a table which comes in handy from time to time. What we are doing when joining tables together is getting information from table.a and combining it table.b. SQL doesn&#39;t really care if table.b is the same table as table.a. Here&#39;s an example: &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;SELECT&amp;nbsp;w.animal_id&amp;nbsp;AS&amp;nbsp;wild_animal_id,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;w.animal_type&amp;nbsp;AS&amp;nbsp;wild_animal_type,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;d.animal_description&amp;nbsp;AS&amp;nbsp;farm_animal_description,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;same.animal_name&amp;nbsp;AS&amp;nbsp;wild_animal_name_from_same_table,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;att.animal_type_description&amp;nbsp;AS&amp;nbsp;description&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;FROM&amp;nbsp;tutorial.wild&amp;nbsp;w&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;LEFT&amp;nbsp;OUTER&amp;nbsp;JOIN&amp;nbsp;tutorial.animal_types&amp;nbsp;att&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;ON&amp;nbsp;w.animal_type&amp;nbsp;=&amp;nbsp;att.animal_type_id&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;INNER&amp;nbsp;JOIN&amp;nbsp;tutorial.animal_descriptions&amp;nbsp;d&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;on&amp;nbsp;w.animal_description&amp;nbsp;=&amp;nbsp;d.animal_description_id&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;LEFT&amp;nbsp;OUTER&amp;nbsp;JOIN&amp;nbsp;tutorial.wild&amp;nbsp;same&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;ON&amp;nbsp;w.animal_id&amp;nbsp;=&amp;nbsp;same.animal_id&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;br /&gt;
In this example, we are combining the same wild table to itself on animal id to get restate it&#39;s name:&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-6HCsARrSRCc/Tahs91P-9RI/AAAAAAAAAmE/SEI8e58qnbs/s1600/combine_4.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-6HCsARrSRCc/Tahs91P-9RI/AAAAAAAAAmE/SEI8e58qnbs/s1600/combine_4.png&quot; style=&quot;cursor: move;&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
While the result might not be that interesting in this example, think about how many times in your applications that you have created multiple tables to express a parent to child relationship. You could easily cut out the multiple table structure by joining a table on itself to change the meaning of the relationship. &lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;&lt;h2&gt;&lt;span&gt;Unions&lt;/span&gt;: A Different Way to Join&lt;/h2&gt;&lt;h2&gt;&lt;br /&gt;
&lt;/h2&gt;Even with INNER, OUTER, Sub-Selects tools at our disposal, we find ourselves needing even further tools to get the right data set at times. Sometimes we need to get information about wild animals as well as our farm animals. We have basically three pictures of ducks and cows that need to be combined into a single picture. Enter a UNION. &lt;br /&gt;
&lt;br /&gt;
A UNION is the combination of multiple queries which combine our data sets into one. Let&#39;s take the situation where we want a description of all animals, whether farm or wild. We can simply express that using a UNION: &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;padding-left: 40px;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px;&quot;&gt;&lt;a href=&quot;http://www.blogger.com/post-create.g?blogID=5766888573580627794#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;http://www.blogger.com/post-create.g?blogID=5766888573580627794#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;http://www.blogger.com/post-create.g?blogID=5766888573580627794#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;http://www.blogger.com/post-create.g?blogID=5766888573580627794#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;SELECT&amp;nbsp;f.animal_id&amp;nbsp;AS&amp;nbsp;animal_id,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_type&amp;nbsp;AS&amp;nbsp;animal_type,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;d.animal_description&amp;nbsp;AS&amp;nbsp;animal_description,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_name&amp;nbsp;AS&amp;nbsp;animal_name,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;Farm&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;AS&amp;nbsp;domain,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;att.animal_type_description&amp;nbsp;AS&amp;nbsp;description&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;FROM&amp;nbsp;tutorial.farm&amp;nbsp;f&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;LEFT&amp;nbsp;OUTER&amp;nbsp;JOIN&amp;nbsp;tutorial.animal_types&amp;nbsp;att&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;ON&amp;nbsp;f.animal_type&amp;nbsp;=&amp;nbsp;att.animal_type_id&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;LEFT&amp;nbsp;OUTER&amp;nbsp;JOIN&amp;nbsp;tutorial.animal_descriptions&amp;nbsp;d&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;ON&amp;nbsp;f.animal_description&amp;nbsp;=&amp;nbsp;d.animal_description_id&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;UNION&amp;nbsp;ALL&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;SELECT&amp;nbsp;w.animal_id&amp;nbsp;AS&amp;nbsp;animal_id,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;w.animal_type&amp;nbsp;AS&amp;nbsp;animal_type,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;d.animal_description&amp;nbsp;AS&amp;nbsp;animal_description,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;w.animal_name&amp;nbsp;AS&amp;nbsp;animal_name,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;Wild&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;AS&amp;nbsp;domain,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;att.animal_type_description&amp;nbsp;AS&amp;nbsp;description&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;FROM&amp;nbsp;tutorial.wild&amp;nbsp;w&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;LEFT&amp;nbsp;OUTER&amp;nbsp;JOIN&amp;nbsp;tutorial.animal_types&amp;nbsp;att&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;ON&amp;nbsp;w.animal_type&amp;nbsp;=&amp;nbsp;att.animal_type_id&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;LEFT&amp;nbsp;OUTER&amp;nbsp;JOIN&amp;nbsp;tutorial.animal_descriptions&amp;nbsp;d&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;ON&amp;nbsp;w.animal_description&amp;nbsp;=&amp;nbsp;d.animal_description_id&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;/div&gt;&lt;br /&gt;
In this UNION the one thing that I have not explained is the explicit column &quot;domain&quot;. I am merely saying either give me &quot;Farm&quot; or &quot;Wild&quot; depending on when you are running. I am also using UNION ALL instead of UNION as I want all results and not just distinct values. Our complex query gives us the expected data set that we were hoping for:&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-ucbEvWFDmF8/TahtDx91H1I/AAAAAAAAAm4/_lGD9m64ogw/s1600/union_1.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-ucbEvWFDmF8/TahtDx91H1I/AAAAAAAAAm4/_lGD9m64ogw/s1600/union_1.png&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-UoFUQo1tGlM/TahtDW63vOI/AAAAAAAAAm0/jn4-jI-Pzxg/s1600/ss_5.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
We can also use a Sub-Select in our UNION: &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;SELECT&amp;nbsp;f.animal_id&amp;nbsp;AS&amp;nbsp;animal_id,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_type&amp;nbsp;AS&amp;nbsp;animal_type,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;d.animal_description&amp;nbsp;AS&amp;nbsp;animal_description,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_name&amp;nbsp;AS&amp;nbsp;animal_name,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;Farm&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;AS&amp;nbsp;domain,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;att.animal_type_description&amp;nbsp;AS&amp;nbsp;description&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;FROM&amp;nbsp;tutorial.farm&amp;nbsp;f&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;LEFT&amp;nbsp;OUTER&amp;nbsp;JOIN&amp;nbsp;tutorial.animal_types&amp;nbsp;att&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;ON&amp;nbsp;f.animal_type&amp;nbsp;=&amp;nbsp;att.animal_type_id&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;LEFT&amp;nbsp;OUTER&amp;nbsp;JOIN&amp;nbsp;tutorial.animal_descriptions&amp;nbsp;d&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;ON&amp;nbsp;f.animal_description&amp;nbsp;=&amp;nbsp;d.animal_description_id&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;UNION&amp;nbsp;ALL&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;SELECT&amp;nbsp;w.animal_id&amp;nbsp;AS&amp;nbsp;animal_id,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;w.animal_type&amp;nbsp;AS&amp;nbsp;animal_type,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;d.animal_description&amp;nbsp;AS&amp;nbsp;animal_description,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;w.animal_name&amp;nbsp;AS&amp;nbsp;animal_name,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;Wild&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;AS&amp;nbsp;domain,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;att.animal_type_description&amp;nbsp;AS&amp;nbsp;description&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;FROM&amp;nbsp;tutorial.wild&amp;nbsp;w&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;LEFT&amp;nbsp;OUTER&amp;nbsp;JOIN&amp;nbsp;tutorial.animal_types&amp;nbsp;att&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;ON&amp;nbsp;w.animal_type&amp;nbsp;=&amp;nbsp;att.animal_type_id&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;LEFT&amp;nbsp;OUTER&amp;nbsp;JOIN&amp;nbsp;tutorial.animal_descriptions&amp;nbsp;d&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;ON&amp;nbsp;w.animal_description&amp;nbsp;=&amp;nbsp;d.animal_description_id&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;WHERE&amp;nbsp;w.animal_id&amp;nbsp;IN&amp;nbsp;(SELECT&amp;nbsp;animal_id&amp;nbsp;FROM&amp;nbsp;wild&amp;nbsp;WHERE&amp;nbsp;animal_id&amp;nbsp;&amp;lt;=&amp;nbsp;3)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;br /&gt;
Basically saying give me a union of the two queries, but only give me the results in the wild side that have an animal id less than or equal to 3. The produced data set is just as expected:&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-zm_FJmjUyzs/TahtERXEnGI/AAAAAAAAAm8/SQV-efbenTs/s1600/union_2.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-zm_FJmjUyzs/TahtERXEnGI/AAAAAAAAAm8/SQV-efbenTs/s1600/union_2.png&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Unions are very easy to use, but a couple of notes. The first side of the UNION will determine the name of the column. In addition, both sides of the UNION must have the identical column numbers. You can&#39;t have one query with 4 columns of data with the other query with 3. &lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;&lt;h2&gt;&lt;span&gt;Simulating a FULL OUTER JOIN&lt;/span&gt;: Practical Use&lt;/h2&gt;&lt;h2&gt;&lt;br /&gt;
&lt;/h2&gt;We can tie up everything that we have learned by simulating a FULL OUTER JOIN which as I stated above MySQL does not support by using a simple UNION statement. Let&#39;s use the original query from the beginning of the tutorial: &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;SELECT&amp;nbsp;f.animal_id&amp;nbsp;AS&amp;nbsp;farm_animal_id,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_type&amp;nbsp;AS&amp;nbsp;farm_animal_type,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;d.animal_description&amp;nbsp;AS&amp;nbsp;farm_animal_description,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_name&amp;nbsp;AS&amp;nbsp;farm_animal_name,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;att.animal_type_description&amp;nbsp;AS&amp;nbsp;description&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;FROM&amp;nbsp;tutorial.farm&amp;nbsp;f&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;LEFT&amp;nbsp;OUTER&amp;nbsp;JOIN&amp;nbsp;tutorial.animal_types&amp;nbsp;att&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;ON&amp;nbsp;f.animal_type&amp;nbsp;=&amp;nbsp;att.animal_type_id&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;LEFT&amp;nbsp;OUTER&amp;nbsp;JOIN&amp;nbsp;tutorial.animal_descriptions&amp;nbsp;d&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;on&amp;nbsp;f.animal_description&amp;nbsp;=&amp;nbsp;d.animal_description_id&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;UNION&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;SELECT&amp;nbsp;f.animal_id&amp;nbsp;AS&amp;nbsp;farm_animal_id,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_type&amp;nbsp;AS&amp;nbsp;farm_animal_type,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;d.animal_description&amp;nbsp;AS&amp;nbsp;farm_animal_description,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f.animal_name&amp;nbsp;AS&amp;nbsp;farm_animal_name,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;att.animal_type_description&amp;nbsp;AS&amp;nbsp;description&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;FROM&amp;nbsp;tutorial.farm&amp;nbsp;f&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;RIGHT&amp;nbsp;OUTER&amp;nbsp;JOIN&amp;nbsp;tutorial.animal_types&amp;nbsp;att&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;ON&amp;nbsp;f.animal_type&amp;nbsp;=&amp;nbsp;att.animal_type_id&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;RIGHT&amp;nbsp;OUTER&amp;nbsp;JOIN&amp;nbsp;tutorial.animal_descriptions&amp;nbsp;d&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;on&amp;nbsp;f.animal_description&amp;nbsp;=&amp;nbsp;d.animal_description_id&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
In this case I am using a UNION statement instead of the UNION ALL statement as I just want distinct values. Here&#39;s my result set:&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-W_cbL7-cyFU/TahtE6GP23I/AAAAAAAAAnA/K6S4nx57UPc/s1600/union_3.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-W_cbL7-cyFU/TahtE6GP23I/AAAAAAAAAnA/K6S4nx57UPc/s1600/union_3.png&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;&amp;nbsp;&lt;/h2&gt;&lt;h2&gt;Conclusion&lt;/h2&gt;&lt;h2&gt;&lt;br /&gt;
&lt;/h2&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: &#39;Times New Roman&#39;; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;/span&gt;Even with my fingers getting callouses from the amount of typing to explain advanced queries, I really have really only scratched the surface. I have done my best to explain joins without the same illustrations of circles showing the affective areas. Those illustrations work, but I think if you lean on your grade school experiences and think &quot;Which one of these is not like the other&quot; you are putting a little more context on the idea of joining data sets and tables. If you visualize your SELECT statements it becomes so much easier to get that result that you have in mind. If I have missed anything, just let me know in the comment section.</content><link rel='replies' type='application/atom+xml' href='http://wdeveloper.blogspot.com/feeds/5838100573304488139/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/tut-deeper-look-at-advanced-select.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/5838100573304488139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/5838100573304488139'/><link rel='alternate' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/tut-deeper-look-at-advanced-select.html' title='[TUT] A Deeper Look at Advanced Select Queries'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-RwhguujyUXg/Tahs5_uuQZI/AAAAAAAAAlg/JqRy-zjnqTk/s72-c/advanced_select_queries.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5766888573580627794.post-7178901103161445118</id><published>2011-04-14T03:00:00.000-07:00</published><updated>2011-04-14T04:37:16.926-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Tuts"/><title type='text'>[TUT] Building an Advanced &quot;Poll&quot; jQuery Plugin</title><content type='html'>&lt;a href=&quot;http://1.bp.blogspot.com/-I_JPHcH08r4/Taa7kWw89NI/AAAAAAAAAks/quakp_i4OSY/s1600/200x200.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-I_JPHcH08r4/Taa7kWw89NI/AAAAAAAAAks/quakp_i4OSY/s1600/200x200.png&quot; /&gt;&lt;/a&gt;Building an Advanced &quot;Poll&quot; jQuery Plugin&lt;br /&gt;
By: Dan Wellman&lt;br /&gt;
&lt;a href=&quot;http://net.tutsplus.com/articles/news/plus-tutorial-build-an-advanced-poll-jquery-plugin-and-a-giveaway/&quot;&gt;http://net.tutsplus.com/articles/news/plus-tutorial-build-an-advanced-poll-jquery-plugin-and-a-giveaway/&lt;/a&gt;&lt;br /&gt;
In this tutorial we’re going to be creating a jQuery plugin from start to finish; this plugin will allow us (or other developers) to easily add a simple poll widget to a web page or blog. By poll widget, I mean an area in which a question is posed which visitors are encouraged to answer. Once they have answered the question the results of the poll will then be displayed.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 24px; font-weight: bold;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 24px; font-weight: bold;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 24px; font-weight: bold;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 24px; font-weight: bold;&quot;&gt;Final Product&lt;/span&gt;&lt;br /&gt;
The following screenshot shows what we’ll be working towards:&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-stuYLL4lriY/Taa7lMFWEoI/AAAAAAAAAkw/gcxn1KDeds0/s1600/jquery_poll_1.png&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-stuYLL4lriY/Taa7lMFWEoI/AAAAAAAAAkw/gcxn1KDeds0/s1600/jquery_poll_1.png&quot; /&gt;&lt;/a&gt;&lt;img src=&quot;file:///D:/Taan/webdeveloper_blogspot/TUTS/01NT_PLUS_Advanced_jquery/images/jquery_poll_1.png&quot; /&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
The plugin will use jQuery goodness to generate the DOM structure of the widget, as well as capture the answer to the question and pass it to the server for storage. We’ll use a little basic PHP to add the newest vote to a MySQL database and then echo back the new results in a JSON object. jQuery will then be used to process the response and display the results (as shown above) in the widget.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Although installing and configuring a web server, PHP and MySQL is beyond the scope of this tutorial, we will be looking at all of the steps needed including setting up the database. All in all, we’ll be working with CSS, HTML, jQuery, PHP, MySQL and JSON during the course of this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Prep Work&lt;/h2&gt;&lt;br /&gt;
We should set up our development area first of all. To run this example on a desktop computer (for development, testing etc) we’ll need to run the example files from a directory our web server can serve content from. I use Apache and have a folder setup on my C drive called apache site. This is the content-serving directory for my localhost. Within this folder (or the equivalent folder on your system) we should create a new folder called poll. This is where all of our example files will be stored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create a jQuery plugin, we’re also going to need a copy of jQuery itself; the latest version is 1.31.js and can be found at &lt;a href=&quot;http://jquery.com/&quot;&gt;http://jquery.com&lt;/a&gt;. Download it to the poll directory we just created. So far the folder should look like this in Explorer (or equivalent file explorer application):&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-belfxdtenm0/Taa7lc9dUoI/AAAAAAAAAk0/-9LnuhkILYU/s1600/jquery_poll_2.png&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;http://2.bp.blogspot.com/-belfxdtenm0/Taa7lc9dUoI/AAAAAAAAAk0/-9LnuhkILYU/s640/jquery_poll_2.png&quot; width=&quot;612&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src=&quot;file:///D:/Taan/webdeveloper_blogspot/TUTS/01NT_PLUS_Advanced_jquery/images/jquery_poll_2.png&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we can set up the database that will be used to store the poll results; we can do this easily enough using the MySQL Command Line Interface(CLI) easily enough, although database front-end GUIs can also be used. Open up the MySQL CLI and create a new database called poll using the following command:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;xmp style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;CREATE DATABASE poll;&lt;/xmp&gt;&lt;br /&gt;
&lt;br /&gt;
The CREATE DATABASE command does exactly what it says on the tin and creates a new database with the specified name. Once we have a database we’ll need to create a new table in which to store the poll results. Before we can do this we need to select the new database; the USE command will do this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;xmp style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;USE poll;&lt;/xmp&gt;&lt;br /&gt;
&lt;br /&gt;
To create a new table we use the CREATE TABLE command, specifying the names for the columns within the table:&lt;br /&gt;
&lt;br /&gt;
&lt;xmp style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;CREATE TABLE results(choices VARCHAR(20), votes INT);&lt;/xmp&gt;&lt;br /&gt;
If we were deploying this on a site we’d start off with an empty table, but so that we can see some results without answering the question ourselves repeatedly, we can enter some dummy data into the table. The quickest and easiest way to do this for small sets of data (just 5 rows in this example) is to do it manually, which we can do with the following series of commands:&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;sql&quot; name=&quot;code&quot;&gt;INSERT INTO results VALUES(‘choice0’, 100);
INSERT INTO results VALUES(‘choice1’, 67);
INSERT INTO results VALUES(‘choice2’, 11);
INSERT INTO results VALUES(‘choice3’, 51);
INSERT INTO results VALUES(‘choice4’, 38);&lt;/pre&gt;&lt;pre class=&quot;sql&quot; name=&quot;code&quot;&gt;&lt;/pre&gt;&lt;br /&gt;
The command should be straight-forward enough, just remember to hit enter after each line. The only point worthy of note is that the first row is choice0 instead of choice1 which is done to make working with the JSON object in our script easier. At this point your CLI should appear something like the following screenshot:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-a7dKk0oqyPw/Taa7l0IHFRI/AAAAAAAAAk4/5gD4eXaywiE/s1600/jquery_poll_3.png&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;394&quot; src=&quot;http://2.bp.blogspot.com/-a7dKk0oqyPw/Taa7l0IHFRI/AAAAAAAAAk4/5gD4eXaywiE/s640/jquery_poll_3.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src=&quot;file:///D:/Taan/webdeveloper_blogspot/TUTS/01NT_PLUS_Advanced_jquery/images/jquery_poll_3.png&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We’re done with the CLI now so we can exit it and move on to our next task – creating the plugin.&lt;br /&gt;
&lt;h2&gt;Building the Plugin&lt;/h2&gt;&lt;br /&gt;
We have a number of tasks to complete with the plugin code; we need to create the DOM structure for the widget, add a handler that listens for submission of the selection, pass the results to the server and process the response, as well as displaying the results once processed. We can also add some sugar in the form of error messages and animated results.&lt;br /&gt;
&lt;br /&gt;
It’s going to take a few lines of code for sure, but it should be worth it as we’ll get to see how easy it is to make a robust, functional and advanced plugin that provides interactivity and adds value to the page. Let’s make a start; in a new file in your text editor add the following code:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;xmp style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;(function($) {  })(jquery)&lt;/xmp&gt;&lt;br /&gt;
&lt;br /&gt;
All of our plugin code will be encapsulated within this self-executing anonymous function. It’s the additional braces after the function that makes it self-executing, and these also allow us to pass arguments into our plugin. In this example, we’re passing the jQuery object into our plugin so that we can make use of all of jQuery’s amazing functionality. The function receives jqueryas the $ alias which is how we can work with the library from within our plugin. Now within the function add the following code &lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;js&quot; name=&quot;code&quot;&gt;//define jPoll object with some default properties
$.jPoll = {
  defaults: {
    ajaxOpts: {
      url: &quot;poll.php&quot;
    },
    groupName: &quot;choices&quot;,
    groupIDs: [&quot;choice0&quot;, &quot;choice1&quot;, &quot;choice2&quot;, &quot;choice3&quot;, &quot;choice4&quot;],
    pollHeading: &quot;Please choose your favourite:&quot;,
    rowClass: &quot;row&quot;,
    errors: true
  }
};&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
This code adds a new object to jQuery called jPoll. Within this object is another object called defaults which contains a number of different properties. Each property will be a configurable option for our plugin that implementers can change according to their requirements. It’s useful to provide as many configurable properties as possible to give the plugin flexibility and robustness.&lt;br /&gt;
&lt;br /&gt;
The first property we set is the ajaxOpts property, the value of which is another object. This object will be used to make the request to the server. We make the URL of the back-end script file a configurable property so that developers can specify their own server-side file to take the result and pass it into the database if required.&lt;br /&gt;
&lt;br /&gt;
Because the values in each property are simply defaults to fall back on if implementers don’t specify them explicitly, we should try to make them as generic as possible, so, for example, thegroupName property, which will be applied to the radio buttons we’ll be creating later, is given the value choices. The groupIDs property accepts an array of values; the array items will be used as labels for the radio buttons and indicate to the visitor the options they have when making a choice.&lt;br /&gt;
&lt;br /&gt;
The rowClass property is used to add a class name to the row elements which will act as containers for the radio buttons and results. The errors property is set to the boolean value true. This allows implementers to switch off the automatic error message if they wish. Flexibility is the key when deciding which features of a plugin should be configurable.&lt;br /&gt;
&lt;br /&gt;
Let’s continue by adding the following code directly after our default configuration object:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;xmp style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;//extend jquery with the plugin $.fn.extend({   jPoll:function(config) {    } });&lt;/xmp&gt;&lt;br /&gt;
&lt;br /&gt;
The jQuery fn.extend method is a special construct provided by jQuery for the creation of plugins; it allows us to add additional methods to jQuery, so our plugin actually becomes part of the library. The method accepts an object which in this example contains a single property – our plugin.&lt;br /&gt;
&lt;br /&gt;
All of our plugin code will be placed within the anonymous function that is specified as the value of the property. This function accepts a single argument and is how implementers supply their own configuration object to alter the default options we added earlier.&lt;br /&gt;
&lt;br /&gt;
Now we can add the code for our plugin that will create the initial DOM structure and render the widget. Within the anonymous function we just created add the following code:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;xmp style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;//use defaults or properties supplied by user config = $.extend({}, $.jPoll.defaults, config);&lt;/xmp&gt;&lt;br /&gt;
&lt;br /&gt;
The extend jQuery method takes the object supplied to our plugin (if it’s provided by the implementer) and applies it to our default configuration object. Any properties supplied by the developer will overwrite the defaults. The method works in a similar way to the fn.extend method although on a smaller scale. Now we can start creating elements:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;xmp style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;//init widget $(&quot;&amp;amp;lt;h2&amp;amp;gt;&quot;).text(config.pollHeading).appendTo($(this)); $(&quot;&amp;amp;lt;form&amp;amp;gt;&quot;).attr({   id: &quot;pollForm&quot;,   action: config.ajaxOpts.url,   method: config.ajaxOpts.type }).appendTo($(this));&lt;/xmp&gt;&lt;br /&gt;
&lt;br /&gt;
First we create a heading which can be used to display the question at the top of the widget. We can then create a form element and append it to the widget using jQuery’s appendTomethod. We can also set some of the form’s attributes.&lt;br /&gt;
&lt;br /&gt;
Within the context of this part of the plugin, the $(this) object refers to the element that our plugin is called on; the HTML page on which it is used will need a container element for the widget to be rendered into and the plugin will be called on the container. Therefore $(this) will refer to the container element. Next we can add the radio buttons and labels that will form the choices a visitor can make:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;xmp style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;for(var x = 0; x &amp;amp;lt; config.groupIDs.length; x++) {    $(&quot;&amp;amp;lt;div&amp;amp;gt;&quot;).addClass(config.rowClass).appendTo($(this).find(&quot;form&quot;));   $(&quot;&amp;amp;lt;input type=&#39;radio&#39; name=&#39;&quot; + config.groupName + &quot;&#39; id=&#39;&quot; + config.groupIDs[x] + &quot;&#39;&amp;amp;gt;&quot;).addClass(&quot;choice&quot;).appendTo($(this).find(&quot;form&quot;).children(&quot;:last&quot;)).click(function() {     ($(&quot;.error&quot;).length != 0) ? $(&quot;.error&quot;).slideUp(&quot;slow&quot;) : null ;   });    $(&quot;&amp;amp;lt;label&amp;amp;gt;&quot;).text(config.groupIDs[x]).attr(&quot;for&quot;, config.groupIDs[x]).appendTo($(this).find(&quot;form&quot;).children(&quot;:last&quot;)); }&lt;/xmp&gt;&lt;br /&gt;
&lt;br /&gt;
The number of choices the visitor can make is dictated by the number of items in the groupIDs array, which by default is five. We loop through the array, which we can access via the config object. On each iteration we create a container element and give it the class name specified by the rowClass property before appending it to the form.&lt;br /&gt;
&lt;br /&gt;
We then create a radio button and append it to the container we added a moment ago. You might be wondering why we specify the attributes for the radio button in-line with its constructor instead of using jQuery’s attr method as we do with other elements. The reason is simply because of a bug in IE that prevents the use of dynamic radio buttons. The structure of these elements will be as highlighted in the following Firebug screenshot:&lt;br /&gt;
&lt;a href=&quot;http://1.bp.blogspot.com/-5Wp7UA8oII4/Taa7mU54KGI/AAAAAAAAAk8/mjeP1vkIV44/s1600/jquery_poll_4.png&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;396&quot; src=&quot;http://1.bp.blogspot.com/-5Wp7UA8oII4/Taa7mU54KGI/AAAAAAAAAk8/mjeP1vkIV44/s640/jquery_poll_4.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;file:///D:/Taan/webdeveloper_blogspot/TUTS/01NT_PLUS_Advanced_jquery/images/jquery_poll_4.png&quot; /&gt;&lt;br /&gt;
&lt;h2&gt;Additional Elements&lt;/h2&gt;&lt;br /&gt;
We also add a click handler for each radio which is trigged when it is selected by the visitor; all the function does is check whether there is one or more elements with the class name error and if so, hides them using the slideUp jQuery animation. We don’t need to worry about checking whether the implementer has disabled the error property at this stage because if no errors are detected, the function will just return false.&lt;br /&gt;
&lt;br /&gt;
Next we add a label for the radio button indicating which choice it refers to. For accessibility we add a for attribute so that the label is associated with the radio that it shares the container div with. Both the label and the radio are attached to the container div using the find and children methods.&lt;br /&gt;
&lt;br /&gt;
To make the plugin as least restrictive as possible we want to refer to as few things as possible using a set ID so using find to return the first form (which will be the one we added ourselves) within the element in the context of $(this), and then selecting the last child allows us to add the elements to the correct container without needing an ID. After the for loop we still need to add a couple more elements:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;xmp style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;$(&quot;div&quot;).attr(&quot;id&quot;, &quot;buttonRow&quot;).addClass(config.rowClass).appendTo($(this).find(&quot;form&quot;));&lt;/xmp&gt;&lt;br /&gt;
&lt;br /&gt;
We add a final container to the widget which will be used to hold the submit button for the form. We’ll add the button a little later on. Save what we’ve done so far as jquery.jpoll.js into the poll directory. At this stage, we can move on to create the HTML page which the widget will be added to, as well as a little basic styling. We added quite a bit of code already and so far I’ve said things like ‘add this code within the function’ etc. The following screenshot shows how the code should appear at this point:&lt;br /&gt;
&lt;a href=&quot;http://3.bp.blogspot.com/-9WuZ1ZsSedk/Taa7m4l8III/AAAAAAAAAlA/m7t11aacA3E/s1600/jquery_poll_5.png&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;408&quot; src=&quot;http://3.bp.blogspot.com/-9WuZ1ZsSedk/Taa7m4l8III/AAAAAAAAAlA/m7t11aacA3E/s640/jquery_poll_5.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;file:///D:/Taan/webdeveloper_blogspot/TUTS/01NT_PLUS_Advanced_jquery/images/jquery_poll_5.png&quot; /&gt;&lt;br /&gt;
&lt;h2&gt;Some Basic HTML and CSS&lt;/h2&gt;&lt;br /&gt;
In a new page in your text editor, create the following very basic page: &lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&amp;lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&amp;gt;
&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;&amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&amp;gt;
    &amp;lt;title&amp;gt;Poll Test&amp;lt;/title&amp;gt;
    &amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;poll.css&quot;&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;div id=&quot;pollContainer&quot;&amp;gt;&amp;lt;/div&amp;gt;
    &amp;lt;script type=&quot;text/javascript&quot; src=&quot;jquery-1.3.1.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script type=&quot;text/javascript&quot; src=&quot;jquery.jpoll.js&quot;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;
      $(&quot;#pollContainer&quot;).jPoll();
    &amp;lt;/script&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Save this as pollTest.html in the poll folder we created earlier. That’s pretty much it as far as the HTML is concerned but it’s all we need. It’s totally minimal, basically a template file that links to an external stylesheet, the jQuery library, and our plugin file. The body of the page has just the required container element present, and in a custom script block we call the jPoll method that we’ve added to jQuery.&lt;br /&gt;
&lt;br /&gt;
The CSS we’ll be using in the example is also pretty basic and is intended to present the widget in a simple skin that highlights its features. None of the CSS is required to control how the widget behaves so you can pretty much use whatever CSS you need to. The following code shows the skin used in this example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;xmp style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;#pollContainer {   width:250px; border:1px solid #000000; margin:0; text-align:center;   background-color:#3a3737; position:relative; padding-bottom:10px; } #pollContainer form, #results {   text-align:left; margin:0 0 0 30px; }  #pollContainer h2, #pollContainer p {   font-family:Verdana; font-size:11px; margin:5px 0; color:#ffffff;   font-weight:bold; } #pollContainer .error {   margin:5px auto 0; background:url(images/warn.gif) no-repeat 0 0;   padding-left:10px; width:182px; } #pollContainer input { margin:0 10px 0 0; } #pollContainer label {   font-family:Verdana; font-size:10px; font-weight:bold;   position:relative; top:-3px; color:#ffffff; } #pollContainer button { margin:5px 0 0; } #results {   width:200px; margin:5px auto 0; border-top:2px solid #ffffff;   border-bottom:2px solid #ffffff; } .row { width:200px; overflow:hidden; } #results label {   width:93px; font-family:Verdana; font-size:11px; font-weight:bold;   color:#ffffff; text-align:right; border-right:2px solid #ffffff;   padding:5px 5px 10px 0; float:left; clear:both; height:10px; top:0; } .result {   background-color:#079d67; width:0; float:left; height:21px;   margin:2px 2px 2px 0; } #pollContainer #thanks {   margin:0; position:relative; width:100%; text-align:center; clear:both;   top:4px; }&lt;/xmp&gt;&lt;br /&gt;
&lt;br /&gt;
Save this file as poll.css in the poll project folder. There’s nothing interesting or difficult here really, it’s all just presentation. I’ve added an image to give the error message more weight. It’s included in the accompanying code download for this tutorial and should be placed into a folder called images within our poll directory. The JavaScript, HTML and CSS that we’ve added so far should go together to form something like the following screenshot when run in a browser:&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-IpNjrMIdyPQ/Taa7nWsPbsI/AAAAAAAAAlE/BlzteM414bQ/s1600/jquery_poll_6.png&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;251&quot; src=&quot;http://4.bp.blogspot.com/-IpNjrMIdyPQ/Taa7nWsPbsI/AAAAAAAAAlE/BlzteM414bQ/s400/jquery_poll_6.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;img src=&quot;file:///D:/Taan/webdeveloper_blogspot/TUTS/01NT_PLUS_Advanced_jquery/images/jquery_poll_6.png&quot; /&gt;&lt;br /&gt;
&lt;h2&gt;Continuing with the Plugin&lt;/h2&gt;&lt;br /&gt;
&lt;br /&gt;
The first stage of the plugin is complete; the widget renders and the (very generic) question to the visitors is posed. Now we need to capture their response and do something with it. Injquery.jpoll.js add the following code directly after the code we added to create the buttonRow container:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;xmp style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;$(&quot;&amp;amp;lt;button type=&#39;submit&#39;&amp;amp;gt;&quot;).text(&quot;Vote!&quot;).appendTo(&quot;#buttonRow&quot;).click(function(e) {   e.preventDefault();        //record which radio was selected   var selected;   $(&quot;.choice&quot;).each(function() {   ($(this).attr(&quot;checked&quot;) == true) ? selected = $(this).attr(&quot;id&quot;) : null ; });      //print message if no radio selected and errors enabled if (config.errors == true) {   (selected == null &amp;amp;amp;&amp;amp;amp; $(&quot;.error&quot;).length == 0) ? $(&quot;&amp;amp;lt;p&amp;amp;gt;&quot;).addClass(&quot;error&quot;).text(&quot;Please make a selection!&quot;).css({display:&quot;none&quot;}).insertAfter(&quot;form#pollForm&quot;).slideDown(&quot;slow&quot;) : null ; }&lt;/xmp&gt;&lt;br /&gt;
&lt;br /&gt;
We add a submit button to the final container within the form and set a click handling function on it. This will be quite a large function so we’ll look at it in small chunks. The first thing we do is prevent the default behaviour of the submit button, which would be to submit the form resulting in a page reload – definitely something we want to avoid in an AJAX scenario.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then we set a new variable called selected which will be used to hold the ID of the radio button that was chosen. We loop through each radio button with jQuery’s each method to see whether the radio has the checked attribute. If no radios were selected the variable will be set to null.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we check that the value of the variable isn’t set to null. If it is, then we can add the error message after the form and show it with a nice little animation. We check that the message isn’t already being displayed to prevent multiple messages being added if the button is repeatedly clicked. The error message should display something like this:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-tjQgrvOea2w/Taa7n_vCOcI/AAAAAAAAAlI/XU33PgNiMGo/s1600/jquery_poll_7.png&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-tjQgrvOea2w/Taa7n_vCOcI/AAAAAAAAAlI/XU33PgNiMGo/s1600/jquery_poll_7.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src=&quot;file:///D:/Taan/webdeveloper_blogspot/TUTS/01NT_PLUS_Advanced_jquery/images/jquery_poll_7.png&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that we’re inside the click handling function for the button, the $(this) object will no longer refer to our widget container, instead it refers to the button, so at this point we have to start referring to the form using the ID attribute we gave it earlier on.&lt;br /&gt;
&lt;br /&gt;
Once we’re satisfied that a choice has been made we can think about sending the details of the choice to the server. We’ll need to configure the AJAX request first which we can do with the following code:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;xmp style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;//add additional request options var addOpts = {   type: &quot;post&quot;,   data: &quot;&amp;amp;amp;choice=&quot; + selected,   dataType:&quot;json&quot;,   success: function(data) {&lt;/xmp&gt;&lt;br /&gt;
&lt;br /&gt;
We create a new object to hold the additional properties required for the AJAX request. We set the type to POST as we’ll be sending data to the server and configure the data that we’ll be sending. The format of the server’s response will be in JSON so the dataType property is set to json. Finally we add a success handler to be executed when the request returns successfully. Within this anonymous function we should add the following code:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;xmp style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;//add all votes to get total     var total = 0;     for (var x = 0; x &amp;amp;lt; data.length; x++) {       total += parseInt(data[x].votes);     }&lt;/xmp&gt;&lt;br /&gt;
&lt;br /&gt;
First we work out the total number of choices that have been made so far by iterating through the response object and adding the number of votes for each choice. We use the standard JavaScript parseInt function to convert the JSON string into an integer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;xmp style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;//change h2   $(&quot;div#pollContainer&quot;).find(&quot;h2&quot;).text(&quot;Results, out of &quot; + total + &quot; votes:&quot;);              //remove form   $(&quot;form#pollForm&quot;).slideUp(&quot;slow&quot;);&lt;/xmp&gt;&lt;br /&gt;
&lt;br /&gt;
We then change the heading element so that it indicates that the widget will now show the results. For good measure we can also show how many votes have been cast so far. We then animate the form away to make space for the results.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;xmp style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;//create results container     $(&quot;&amp;amp;lt;div&amp;amp;gt;&quot;).attr(&quot;id&quot;, &quot;results&quot;).css({ display:&quot;none&quot; }).insertAfter(&quot;#pollForm&quot;);                //create results     for (var x = 0; x &amp;amp;lt; data.length; x++) {               //create row elment       $(&quot;&amp;amp;lt;div&amp;amp;gt;&quot;).addClass(&quot;row&quot;).attr(&quot;id&quot;, &quot;row&quot; + x).appendTo(&quot;#results&quot;);               //create label and resuls       $(&quot;&amp;amp;lt;label&amp;amp;gt;&quot;).text(config.groupIDs[x]).appendTo(&quot;#row&quot; + x);       $(&quot;&amp;amp;lt;div&amp;amp;gt;&quot;).attr(&quot;title&quot;, Math.round(data[x].votes / total * 100) + &quot;%&quot;).addClass(&quot;result&quot;).css({ display:&quot;none&quot; }).appendTo(&quot;#row&quot; + x);     }&lt;/xmp&gt;&lt;br /&gt;
&lt;br /&gt;
This segment of code creates a container div for the results then in the same way that we created containers and form elements earlier on, we create container elements and results. Each row in the results container will have a label, which uses the config.groupIDs property to set the text of the labels. Each result will be a div element as well and we work out the percentage of votes for each choice and add this as the title attribute. The results container and each result div are initially hidden from view. This is so that we can show them using smart animations:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;xmp style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;//show results container       $(&quot;#results&quot;).slideDown(&quot;slow&quot;, function() {                //animate each result         $(&quot;.result&quot;).each(function(i) {           $(this).animate({ width: Math.round(data[i].votes / total * 100) }, &quot;slow&quot;);         });                  //create and show thanks message         $(&quot;&amp;amp;lt;p&amp;amp;gt;&quot;).attr(&quot;id&quot;, &quot;thanks&quot;).text(&quot;Thanks for voting!&quot;).css({ display:&quot;none&quot; }).insertAfter(&quot;#results&quot;).fadeIn(&quot;slow&quot;);         });            }   };&lt;/xmp&gt;&lt;br /&gt;
&lt;br /&gt;
Finally, we can slide the results container into view with jQuery’s slideDown method, and then show each result with a custom animation that sets the width of the result div to reflect the percentage of votes for each choice. We can also add a thanks message to thank the visitor for taking part and fade this into view.&lt;br /&gt;
&lt;br /&gt;
We use JavaScript’s Math.round function to set the number as an integer, which is cleaner in this situation. We also work out the number of votes as a percentage (again using the total variable). I think for this kind of widget using a percentage is better because it will prevent the results div getting too big for the widget.&lt;br /&gt;
&lt;br /&gt;
Remember however, all of this code resides within the success handler for our AJAX request – we still need to actually make the request. Directly after the above code, add the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;xmp style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;//merge ajaxOpts widget properties and additional options objects   ajaxOpts = $.extend({}, addOpts, config.ajaxOpts);        //make request if radio selected   return (selected == null) ? false : $.ajax(ajaxOpts) ; });     //return the jquery object for chaining return this;&lt;/xmp&gt;&lt;br /&gt;
&lt;br /&gt;
In the final section of code for our plugin we use jQuery’s extend method once more to combine the configurable AJAX property from the developer-supplied configuration object (or the config object) with the additional options we set a little while ago.&lt;br /&gt;
&lt;br /&gt;
Provided a radio button was selected we then make the request using jQuery’s ajax method, supplying our newly merged ajaxOpts object as an argument. The final part of the plugin is very important; we should return this (which will now once again refer to the object representing our widget’s main container div as we are outside of any inner functions) so that additional jQuery methods can be chained onto our method.&lt;br /&gt;
&lt;br /&gt;
Again, here’s a screenshot to show how the end of the plugin file should be looking at this point:&lt;br /&gt;
&lt;a href=&quot;http://2.bp.blogspot.com/-Lkuq_8pTzeg/Taa7ofeVqLI/AAAAAAAAAlM/_f2Lf8cUQO4/s1600/jquery_poll_8.png&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;542&quot; src=&quot;http://2.bp.blogspot.com/-Lkuq_8pTzeg/Taa7ofeVqLI/AAAAAAAAAlM/_f2Lf8cUQO4/s640/jquery_poll_8.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;file:///D:/Taan/webdeveloper_blogspot/TUTS/01NT_PLUS_Advanced_jquery/images/jquery_poll_8.png&quot; /&gt;&lt;br /&gt;
This is now all of the code required for our plugin. We can next look at an example of the kind of PHP code needed to handle the request made by our plugin. There are many different ways in which we could achieve the same end using different techniques or server-side script languages. I’ve used PHP in this example because I like it, but other languages may be equally as effective.&lt;br /&gt;
&lt;h2&gt;A Little PHP&lt;/h2&gt;&lt;br /&gt;
The PHP needed for this example is relatively straight-forward, we’ll see all of the code needed and then look at what each bit does. In a new file add the following code:&lt;br /&gt;
&lt;br /&gt;
&lt;xmp style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&amp;lt;?php    //db connection details   $host = &quot;localhost&quot;;   $user = &quot;root&quot;;   $password = your_password_here;   $database = &quot;poll&quot;;     //make connection   $server = mysql_connect($host, $user, $password);   $connection = mysql_select_db($database, $server);    //get post data   $selected = $_POST[&#39;choice&#39;];     //update table   mysql_query(&quot;UPDATE results SET votes = votes + 1 WHERE choices = &#39;$selected&#39;&quot;);     //query the database   $query = mysql_query(&quot;SELECT * FROM results&quot;);     //loop through and return results   for ($x = 0, $numrows = mysql_num_rows($query); $x &amp;amp;lt; $numrows; $x++) {     $row = mysql_fetch_assoc($query);        //make array     $json[$x] = array(&quot;choice&quot; =&amp;amp;gt; $row[&quot;choices&quot;], &quot;votes&quot; =&amp;gt; $row[&quot;votes&quot;]);   }     //echo results   echo json_encode($json);    //close connection   mysql_close($server);   ?&amp;gt;&lt;/xmp&gt;&lt;br /&gt;
Save this in the poll folder as poll.php. The first thing we do in the PHP is define the credentials needed to access and work with the MySQL database that we created at the start of this tutorial. The host and username will depend upon how MySQL is configured on your system and the password should be whatever password you enter when signing into the MySQL CLI. The information needed is stored in the $connection variable for easy access later in the script.&lt;br /&gt;
&lt;br /&gt;
Once we have the necessary connection information we can then get the data passed to the script by our plugin, which will be accessible from the $_POST superglobal. Next we can update the table in our database with the new choice made by the visitor. This is really easy and simply involves looping through each row of the table until we find a row where the data in thechoices column matches the data obtained from the superglobal. We then increment the value of the integer in the votes column by one.&lt;br /&gt;
&lt;br /&gt;
Once the table has been updated we then query the table to get the new totals. We select all of the table data using the SELECT * FROM syntax and store this in the $query variable. Using a for loop we then loop through each row of data and create a new associative array item for each row containing the data from the choices and votes columns in the table.&lt;br /&gt;
&lt;br /&gt;
Once we’ve built our multidimensional associative array (which sounds much more complex than it actually is!) we can then use PHP’s native json_encode function build a proper JSON structured object from the array and then echo this back to our plugin. Finally we close the MySQL connection as it’s no longer needed and we don’t want to keep it open unnecessarily.&lt;br /&gt;
&lt;h2&gt;About the JSON&lt;/h2&gt;&lt;br /&gt;
Let’s take a little look at the structure of the JSON object that is returned to the plugin – it is a key part of how the plugin works. Once we’ve made a choice and hit the vote button, we can then use the Dom tab of Firebug to have a look at the data that’s returned:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://2.bp.blogspot.com/-vJwJOeZ1I9A/Taa7ogDt4vI/AAAAAAAAAlQ/kaE-saBc6Qs/s1600/jquery_poll_9.png&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;220&quot; src=&quot;http://2.bp.blogspot.com/-vJwJOeZ1I9A/Taa7ogDt4vI/AAAAAAAAAlQ/kaE-saBc6Qs/s640/jquery_poll_9.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;img src=&quot;file:///D:/Taan/webdeveloper_blogspot/TUTS/01NT_PLUS_Advanced_jquery/images/jquery_poll_9.png&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
This screenshot tells us everything we need to know about the properties and values within our object. Because the object is a standard JavaScript object pretty much like any other, we already know how we can access the different parts of it. Like a standard array and object like this will have a length property and can be access using standard bracket notation, e.g.data[x]. To access the first property of the first item in the object we just use data[x].choice which returns the value of the property. To access the second property, we just godata[x].votes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This simplicity is what makes JSON so incredible, and that’s without JSONP. JSONP, which we haven’t covered in this tutorial, is quite simply, total JavaScript nirvana; letting us access remote data, completely cross-domain if necessary, and processing it directly in the browser. It’s no wonder than JSON is quicker and easier to work with even than the very flexible XML.&lt;br /&gt;
&lt;h2&gt;Playing with the Plugin&lt;/h2&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-1dpNwnCx4RI/Taa7pGqbxpI/AAAAAAAAAlU/5fdbXZw-WO4/s1600/jquery_poll_10.png&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;372&quot; src=&quot;http://1.bp.blogspot.com/-1dpNwnCx4RI/Taa7pGqbxpI/AAAAAAAAAlU/5fdbXZw-WO4/s640/jquery_poll_10.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
We’ve gotten to the stage now where we can see the plugin in action. Our project folder should now contain all of the required files:&lt;br /&gt;
&lt;img src=&quot;file:///D:/Taan/webdeveloper_blogspot/TUTS/01NT_PLUS_Advanced_jquery/images/jquery_poll_10.png&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
If you go in your browser of choice now and type the following URL in the address bar you should see the initial widget:&lt;br /&gt;
&lt;br /&gt;
http://localhost/poll/pollTest.html&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-q0sT2LPFWgQ/Taa7poFvRUI/AAAAAAAAAlY/7y_jKBPy4qU/s1600/jquery_poll_11.png&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-q0sT2LPFWgQ/Taa7poFvRUI/AAAAAAAAAlY/7y_jKBPy4qU/s1600/jquery_poll_11.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src=&quot;file:///D:/Taan/webdeveloper_blogspot/TUTS/01NT_PLUS_Advanced_jquery/images/jquery_poll_11.png&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once we’ve made a choice and hit the vote button, we should then see the results page and each result as it is animated into existence. It should appear something like in the screenshot at the start of the tutorial.&lt;br /&gt;
&lt;h2&gt;Configuring the Widget&lt;/h2&gt;&lt;br /&gt;
In the final part of the tutorial we can see how the widget can be configured using the options we specified in the defaults object. Our plugin is called in the final script block in the HTML page; change this line of code so that it is as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;xmp style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;$(&quot;#pollContainer&quot;).jPoll({    groupIDs: [&quot;Firefox&quot;, &quot;Chrome&quot;, &quot;IE&quot;, &quot;Safari&quot;, &quot;Opera&quot;],    pollHeading: &quot;Which Browser is Your Faviouite?&quot; });&lt;/xmp&gt;&lt;br /&gt;
&lt;br /&gt;
Now when the page is run, the widget should appear like this instead:&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-cBi-0bpei4M/Taa7qNdJdHI/AAAAAAAAAlc/StNPXMJ5q6E/s1600/jquery_poll_12.png&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-cBi-0bpei4M/Taa7qNdJdHI/AAAAAAAAAlc/StNPXMJ5q6E/s320/jquery_poll_12.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;img src=&quot;file:///D:/Taan/webdeveloper_blogspot/TUTS/01NT_PLUS_Advanced_jquery/images/jquery_poll_12.png&quot; /&gt;&lt;br /&gt;
&lt;h2&gt;Summary&lt;/h2&gt;This brings us to the end of the tutorial; I hope it’s shown you how easy it is to build even an advanced plugin when we have jQuery at our side. The library provides everything we need, all our plugins will be limited only by our imaginations, never through a lack of the appropriate mechanisms for doing what we want to do.&lt;br /&gt;
&lt;br /&gt;
Our plugin is as flexible as it needs to be; changing the question and the labels makes no difference to how the widget interacts with the PHP file; you could have more choices if you wanted and these two files, thanks to the generality we built in, will still work seamlessly together. The only thing we can’t make generic is the MySQL database; this must be set up in the way we have specified, and if more or less choices are desired, the appropriate number of rows would need to be added or removed from the table.&lt;br /&gt;
&lt;br /&gt;
Download source code:&lt;br /&gt;
&lt;a href=&quot;http://www.mediafire.com/file/xf313eshptn9yxb/wdeveloper.blogspot.com_NT_PLUS_Advanced_jquery.rar&quot;&gt;http://www.mediafire.com/file/xf313eshptn9yxb/wdeveloper.blogspot.com_NT_PLUS_Advanced_jquery.rar&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://wdeveloper.blogspot.com/feeds/7178901103161445118/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/tut-building-advanced-poll-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/7178901103161445118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/7178901103161445118'/><link rel='alternate' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/tut-building-advanced-poll-jquery.html' title='[TUT] Building an Advanced &quot;Poll&quot; jQuery Plugin'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-I_JPHcH08r4/Taa7kWw89NI/AAAAAAAAAks/quakp_i4OSY/s72-c/200x200.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5766888573580627794.post-7278518913155704893</id><published>2011-04-13T22:01:00.000-07:00</published><updated>2011-04-14T04:21:06.476-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Tuts"/><title type='text'>[TUT] A Beginner&#39;s Guide to Mootools</title><content type='html'>&lt;div style=&quot;text-align: right;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-IXqr0cknSAw/TaZ-lhHuVoI/AAAAAAAAAko/ZDxVLRBa8I4/s1600/preview.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-IXqr0cknSAw/TaZ-lhHuVoI/AAAAAAAAAko/ZDxVLRBa8I4/s1600/preview.png&quot; /&gt;&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;h2&gt;&lt;b&gt;A&amp;nbsp;Beginner&#39;s Guide to Mootools&lt;/b&gt;&lt;/h2&gt;&lt;/div&gt;&lt;div style=&quot;text-align: right;&quot;&gt;By: Matt Vicker&lt;/div&gt;&lt;div style=&quot;text-align: right;&quot;&gt;&amp;nbsp;&lt;a href=&quot;http://net.tutsplus.com/articles/news/the-ultimate-guide-for-learning-mootools-new-plus-tutorial/&quot;&gt;http://net.tutsplus.com/articles/news/the-ultimate-guide-for-learning-mootools-new-plus-tutorial&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: right;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: right;&quot;&gt;Getting started with any type of framework can be an intimidating experience. To help, this week we have an in depth tutorial and long screencast to provide a crash-course for this popular JavaScript library. With so much focus on jQuery, it&#39;s easy to forget that Mootools is an equally powerful library with a huge following.&lt;/div&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After the initial move to Mootools I was frustrated with the lack of community support and ended up moving back to Prototype immediately. After I was more comfortable with working with frameworks I moved back to Mootools and haven&#39;t looked back.&lt;br /&gt;
&lt;br /&gt;
With this tutorial, I&#39;m going to try to make sure that you have a great beginning to the Mootools framework. I&#39;m going to walk you through getting everything downloaded and setup as well as some of the basic elements of Mootools. After that I&#39;m going to spend some time walking you through how to use the Mootools Docs, which is a site that you&#39;ll be visiting very often during the use of Mootools.&lt;br /&gt;
&lt;br /&gt;
All right, enough stories, lets get our hands dirty.&lt;br /&gt;
&lt;h2&gt;Some Requirements&lt;/h2&gt;&lt;br /&gt;
The nice thing about working purely with javascript is we don&#39;t need to run the files on a web or local server. All you need for this tutorial is:&lt;br /&gt;
A text editor/IDE &lt;br /&gt;
A browser &lt;br /&gt;
Some time. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this tutorial I will be using Firefox and Firebug to show you some debugging tips, so I recommend that you use firefox as well as Firebug. Firebug will make working with Mootools, or any framework, 100x easier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can &lt;a href=&quot;http://getfirebug.com/&quot;&gt;download firebug here&lt;/a&gt;&lt;br /&gt;
&lt;h2&gt;Downloading the Framework&lt;/h2&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-OBXHxesWcvI/TaZ-hp-707I/AAAAAAAAAkI/RPb2UDf_6DM/s1600/1.png&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-OBXHxesWcvI/TaZ-hp-707I/AAAAAAAAAkI/RPb2UDf_6DM/s1600/1.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Head over to &lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/beginners_guide_to_mootools/www.Mootools.net/download&quot;&gt;www.Mootools.net/download&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For now we are going to include both the Core and More libraries. This is just to make sure we aren&#39;t missing anything. When you become more comfortable with Mootools you will realize that not all the components are needed for specific applications, so you can custom build Mootools libraries to fit your need and keep the file sizes small.&lt;br /&gt;
&lt;br /&gt;
Download the Mootools 1.2.3 YUI compressed file and save it to your desktop.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://1.bp.blogspot.com/-tCVO5i81Zzg/TaZ-iXIioeI/AAAAAAAAAkM/gDMYjeUAXX0/s1600/2.png&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-tCVO5i81Zzg/TaZ-iXIioeI/AAAAAAAAAkM/gDMYjeUAXX0/s1600/2.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Move over to the more builder, select every option and download the YUI compressed file.&lt;br /&gt;
&lt;h2&gt;Setting up the Framework&lt;/h2&gt;&lt;br /&gt;
Let&#39;s create a new folder called Moo and inside that folder lets create another folder called inc. Just to make things easier, create one more file inside our inc folder called js and toss both Mootools files inside that folder.&lt;br /&gt;
&lt;br /&gt;
Inside our Moo folder, create a new file called index.html and open that sucker up.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://1.bp.blogspot.com/-nygG5uDZbPc/TaZ-i_QajOI/AAAAAAAAAkQ/KyP-pmd_0ME/s1600/3.png&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-nygG5uDZbPc/TaZ-i_QajOI/AAAAAAAAAkQ/KyP-pmd_0ME/s1600/3.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Is it open? Good, now open it in Firefox as well. You should see a blank page. Switch back to your index.html file in your editor.&lt;br /&gt;
&lt;br /&gt;
To include Mootools into our script, we need to add 2 lines of code to your HTML file. If you&#39;ve ever included a javascript file into a script before this will be very familiar to you.&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;html&quot; name=&quot;code&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;inc/js/Mootools-1.2.3-core-yc.js&quot;&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;script type=&quot;text/javascript&quot; src=&quot;inc/js/Mootools-1.2.3.1-more.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;html&quot; name=&quot;code&quot;&gt;&lt;/pre&gt;We are now setup and ready to go!&lt;br /&gt;
&lt;h2&gt;Making Mootools talk to elements&lt;/h2&gt;&lt;br /&gt;
To get Mootools to talk to elements on our page we use the $() function to get an element by it&#39;s ID.&lt;br /&gt;
&lt;br /&gt;
Let&#39;s create a new div, give it an ID and some text and then make Mootools talk to it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;html&quot; name=&quot;code&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&amp;lt;div id=&quot;box&quot;&amp;gt;&amp;lt;p&amp;gt;Hey Guys!&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;

  After that lets put some javascript tags so we can start writing some Mootools.

  &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;

   //I hold the javascript

  &amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;html&quot; name=&quot;code&quot;&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;We&#39;ve created out div and gave it an ID of &quot;box&quot;. We inserted some text inside of it and created some script tags so we can start entering in some Mootools goodness.&lt;br /&gt;
If we use the $ function and pass the id of our box, we can see that Mootools is not getting all the attributes of our &quot;box&quot; div. Our variable element now holds all that data.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;javascript&quot; name=&quot;code&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;var element = $(&#39;box&#39;);&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
If we refresh the page, we can&#39;t visibly see that anything is happening, but we know things are going on in the background. This is where console.log() and Firebug come into play.&lt;br /&gt;
&lt;br /&gt;
If you open up Firebug, you should see a blank console. Using console.log() we can pass information to Firebug to display for us. This is extremely useful when debugging a script because you can use it to display information in various steps of your script to see where things are failing.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: monospace; font-size: 12px; line-height: 18px; white-space: pre;&quot;&gt;console.log(&#39;Oh, Hi Everyone!&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://4.bp.blogspot.com/-_YoM1qnSwCM/TaZ-jOABRqI/AAAAAAAAAkU/0XdE8cxZSX8/s1600/4.png&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-_YoM1qnSwCM/TaZ-jOABRqI/AAAAAAAAAkU/0XdE8cxZSX8/s1600/4.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can also use it to display information that otherwise wouldn&#39;t be displayed in our browser.&lt;br /&gt;
&lt;br /&gt;
Lets use console.log() to display some information about our &quot;box&quot; div.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;javascript&quot; name=&quot;code&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;console.log(element);&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;a href=&quot;http://2.bp.blogspot.com/-P8fMg1lfJL4/TaZ-ju29PhI/AAAAAAAAAkY/_31HJSkXEr0/s1600/5.png&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-P8fMg1lfJL4/TaZ-ju29PhI/AAAAAAAAAkY/_31HJSkXEr0/s1600/5.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So we&#39;ve learned that we can use $() to get an element but what if we want to get the information of many elements. We don&#39;t want to use 100 instances of $() that will just get messy. This is where the $() comes into play!&lt;br /&gt;
&lt;br /&gt;
Who needs to get one, lets get many!&lt;br /&gt;
&lt;br /&gt;
Lets add 5 links to our page.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;html&quot; name=&quot;code&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&amp;lt;p&amp;gt;&amp;lt;a href=&quot;http://linkone.com&quot;&amp;gt;I&#39;m the first link&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
  &amp;lt;p&amp;gt;&amp;lt;a href=&quot;http://linktwo.com&quot;&amp;gt;I&#39;m the second link&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
  &amp;lt;p&amp;gt;&amp;lt;a href=&quot;http://linkthree.com&quot;&amp;gt;I&#39;m the third link&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
  &amp;lt;p&amp;gt;&amp;lt;a href=&quot;http://linkfour.com&quot;&amp;gt;I&#39;m the fourth link&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
  &amp;lt;p&amp;gt;&amp;lt;a href=&quot;http://linkfive.com&quot;&amp;gt;I&#39;m the fifth link&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;

  ...
  javascript tags
  ...

  var links = $$(&#39;a&#39;);

  console.log(links);&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
Our links variable now holds an array of all our links.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://3.bp.blogspot.com/-afdr0AUFJpg/TaZ-kI5chTI/AAAAAAAAAkc/YYuRQtBFrUQ/s1600/6.png&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-afdr0AUFJpg/TaZ-kI5chTI/AAAAAAAAAkc/YYuRQtBFrUQ/s1600/6.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All right, so we&#39;ve created our elements and now we&#39;ve got Mootools talking to them, but this isn&#39;t any fun. The front end user isn&#39;t seeing any changes, so lets move away from this boring backend stuff and move onto something a little more fun!&lt;br /&gt;
&lt;h2&gt;Getters and Setters&lt;/h2&gt;&lt;br /&gt;
We&#39;ve just covered getting the elements using our getter functions. We can get a single element using $() and the elements ID. We&#39;ve also covered getting multiple elements using $() and the element type.&lt;br /&gt;
&lt;br /&gt;
When using $() we can either pass the HTML tag name or use CSS class selectors to grab group of elements. A quick example of grabbing class names would look like this.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;javascript&quot; name=&quot;code&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;var elements = $$(&#39;.myclass&#39;);&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
That would return an array of all elements on the page with the css class of &quot;myclass&quot;.&lt;br /&gt;
&lt;br /&gt;
Theory is dry as a bone and that&#39;s what the docs are for but you came here to get your hands dirty, so lets get dirty.&lt;br /&gt;
&lt;br /&gt;
Now that we are getting our elements, lets use the setter functions to manipulate the elements on screen.&lt;br /&gt;
&lt;br /&gt;
Our &quot;box&quot; div is looking kinda plain so lets add some color to it. We&#39;ve already set our element into our element variable.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;javascript&quot; name=&quot;code&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;element.set(&#39;styles&#39;,{
   &#39;color&#39;:&#39;red&#39;
  });&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
We use our element variable and we attach the set() function by using element.set().&lt;br /&gt;
&lt;br /&gt;
There are many arguments we can use to change our element, but for now we are going to use styles. Next we pass some options to our styles argument. We are passing the color option and setting our text to red. Styles can use all available css options. Let&#39;s change the background color while we are here. Feel free to play around with the styles and see how colorful you can make our box element.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;javascript&quot; name=&quot;code&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;element.set(&#39;styles&#39;,{
   &#39;color&#39;:&#39;red&#39;,
   &#39;background&#39;:&#39;yellow&#39;
  });&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
Our &quot;box&quot; element is not looking a little less plain. If we wanted to apply many styles to our box element it could end up being a lot of unnecessary code. Luckily, we can use CSS styles and another set argument to cut down on out code. Go ahead and delete out element.set() code. We are going to add some css styles using inline css.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: To make things easier we are going to write our CSS inside the file, but when creating an actual website it is good practice to have all your CSS and Javascript in separate file.&lt;br /&gt;
&lt;br /&gt;
Above your &quot;box&quot; div lets add some style tags and create a class of .myclass.&lt;br /&gt;
&lt;br /&gt;
We can now use set(&#39;style&#39;) to add our new style to our element.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;javascript&quot; name=&quot;code&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;element.set(&#39;class&#39;,&#39;myclass&#39;);&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;a href=&quot;http://4.bp.blogspot.com/-F0CKQTXAapo/TaZ-kqPREcI/AAAAAAAAAkg/HGbVzXBiGcA/s1600/7.png&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-F0CKQTXAapo/TaZ-kqPREcI/AAAAAAAAAkg/HGbVzXBiGcA/s1600/7.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A few other argument we can use with set are HTML and text. Some basic examples of this are:&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;javascript&quot; name=&quot;code&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;element.set(&#39;html&#39;,&#39;&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Hey Guys, now I am bold&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&#39;);
  element.set(&#39;text&#39;,&#39;Hey guys, no html here&#39;);&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
Which argument you use will depend on what you need to use it for. If you do not need to pass HTML values, you&#39;d use text and vise-versa if you needed to pass HTML values.&lt;br /&gt;
&lt;br /&gt;
We&#39;ve used set() to add some styles to our &quot;box&quot; div, but we could&#39;ve just added the class to the div using HTML. We don&#39;t really need to use Mootools to add the style if we are just changing it before the user even sees the change. This is where events come in handy.&lt;br /&gt;
&lt;h2&gt;We are hosting an event and everyone is invited!&lt;/h2&gt;&lt;br /&gt;
Lets go ahead and delete all those links we created and clear our javascript tags.&lt;br /&gt;
&lt;br /&gt;
Your index.html file should now include only this code:&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;html&quot; name=&quot;code&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&amp;lt;style type=&quot;text/css&quot;&amp;gt;

   .myclass{
    font-family: Helvetica;
    font-size: 1.4em;
    color: red;
    background: #e1e1e1;
    border-bottom: 2px solid #999;
    padding: 4px 0 0 15px;
    margin: 0;
   }

  &amp;lt;/style&amp;gt;

  &amp;lt;div id=&quot;box&quot;&amp;gt;&amp;lt;p&amp;gt;Hey Guys!&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;

  &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;

   var element = $(&#39;box&#39;);

  &amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create a new link and give it an ID of button right under out &quot;box&quot; div.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;html&quot; name=&quot;code&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&amp;lt;p&amp;gt;&amp;lt;a href=&quot;&quot; id=&quot;button&quot;&amp;gt;Click me please!&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
Now we are going to add an event to this button so we can execute some code when a user clicks the link. We use addEvent() to do this.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;javascript&quot; name=&quot;code&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;$(&#39;button&#39;).addEvent(&#39;click&#39;,function(e){

  });&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;javascript&quot; name=&quot;code&quot;&gt;&lt;/pre&gt;We are using the familiar $() function to tell Mootools we want to talk to the link with an ID of button. Next we attach the addEvent() and pass 2 arguments. The first argument is the event that we want to capture which is when a user clicks the link. The second argument is a function with a variable of e. This function is going to execute when the user clicks the link and the variable of e passes the event. You&#39;ll understand why we pass a variable with the function in this next step.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;javascript&quot; name=&quot;code&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;...
  inside addEvent
  ...

  e.stop();&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
We assign the stop() function to our variable of e to stop the browser for send the link action. Usually when you click the link, the page will refresh and all your changes will be lost. e.stop() stops the browser from refreshing the page so we can do some Mootools magic!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now we have Mootools capture the click event so lets make Mootools add our class of .myclass to our &quot;box&quot; div when the link is clicked.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;javascript&quot; name=&quot;code&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;...
  inside addEvent()
  ...

  element.set(&#39;class&#39;,&#39;myclass&#39;);&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Save this, refresh the page and click your link. On clicking the link, the div should now have some styling to it. We did all that without having to refresh the page. This is where Mootools starts to get very interesting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Quick little refresher before we continue. We&#39;ve learned how to use getter functions ($ and $) to allow Mootools to talk to elements on our page. Then we learned that we could use setter functions to manipulate those elements. Events allow use to capture user interaction so that we can manipulate elements in realtime without having to refresh the page to reflect each change.&lt;br /&gt;
&lt;h2&gt;Creating elements are a snap!&lt;/h2&gt;&lt;br /&gt;
&lt;br /&gt;
Mootools will also allow you to create new elements on the fly so we can let the user customize the page. To do this we are going to be using the new Element() and inject() functions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lets start with a fresh HTML file. Either delete everything from index.html or create a new file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In our file we are going to create a div and 2 links. Go ahead and create those now!&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;html&quot; name=&quot;code&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&amp;lt;div id=&quot;result&quot;&amp;gt;

  &amp;lt;/div&amp;gt;

  &amp;lt;p&amp;gt;&amp;lt;a href=&quot;&quot; id=&quot;grey_box&quot;&amp;gt;Add a Grey Box&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
  &amp;lt;p&amp;gt;&amp;lt;a href=&quot;&quot; id=&quot;blue_box&quot;&amp;gt;Add a Blue Box&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;

  &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;


  &amp;lt;/script&amp;gt;
&lt;/span&gt;&lt;/pre&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;We are going to use the $() to add an event to both of our links on the page. We are going to capture the click event and then create a new element. Lastly we are going to inject our new element into our &quot;result&quot; div.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;javascript&quot; name=&quot;code&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;$$(&#39;a&#39;).addEvent(&#39;click&#39;,function(e){

   e.stop();

  });
&lt;/span&gt;&lt;/pre&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;We use $(&#39;a&#39;) to grab all the links and then attach the addEvent() to each link. We do this because it cuts down on coding so we don&#39;t have to find each ID of the links and create addEvents for them. We are going to use the ID of each link to determine which style we need to add. Lets whip up some quick css for the boxes we are going to create.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;css&quot; name=&quot;code&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&amp;lt;style type=&quot;text/css&quot;&amp;gt;

   .grey_box{
    height: 50px;
    width: 50px;
    float: left;
    clear: none;
    background: grey;
   }

   .blue_box{
    height: 50px;
    width: 50px;
    float: left;
    clear: none;
    background: blue;
   }

  &amp;lt;/style&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Now it&#39;s time to create our elements and inject them into the page.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;javascript&quot; name=&quot;code&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;var class = this.id;

  var box = new Element(&#39;div&#39;,{&#39;class&#39;:class});

  box.inject($(&#39;result&#39;));&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
First we are creating a variable called &quot;class&quot; the hold the ID of the link that was clicked. Our next line takes care of creating the element. We do this by using new Element() and then passing some arguments. The first argument is the type of element we want to create. We want to create a div, so we pass a value of div. The second set is our options. We want to assign a different class depending on which link was clicked. We do this by first telling the function that we want to set the &quot;class&quot; option, then we pass our variable of class which will return either&quot;blue_box&quot; or &quot;grey_box&quot;.&lt;br /&gt;
&lt;br /&gt;
The last line is taking our new element, which we placed into a &quot;box&quot; variable and is injecting it into our &quot;result&quot; div. Mootools knows to inject it into &quot;result&quot; because we are passing the&quot;result&quot; div using a getter method as the main option.&lt;br /&gt;
&lt;br /&gt;
Now if we refresh the page and start clicking our links you should see that little boxes are being created on the fly and are being added to the page.&lt;br /&gt;
&lt;h2&gt;I have that effect on people&lt;/h2&gt;&lt;br /&gt;
At this point in the tutorial you should be fairly comfortable with using getter and setter functions to get Mootools to talk to our elements.&lt;br /&gt;
&lt;br /&gt;
For the last part of this tutorial I&#39;m going to touch on some of the animation and effects functions that Mootools offers.&lt;br /&gt;
&lt;br /&gt;
Lets create another new file. Inside that file create a div with some text inside of it and a link.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;html&quot; name=&quot;code&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&amp;lt;div id=&quot;box&quot;&amp;gt;
   &amp;lt;p&amp;gt;Hey Guys!&amp;lt;/p&amp;gt;
  &amp;lt;/div&amp;gt;

  &amp;lt;p&amp;gt;&amp;lt;a href=&quot;&quot; id=&quot;button&quot;&amp;gt;Click Me&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;

  &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;


  &amp;lt;/script&amp;gt;
&lt;/span&gt;&lt;/pre&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
I&#39;ve added ID&#39;s to each element so we can get Mootools talking to them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To start, lets attach an event to the link. This should look very familiar by now.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;javascript&quot; name=&quot;code&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;$(&#39;button&#39;).addEvent(&#39;click&#39;,function(e){

   e.stop();

  });&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;javascript&quot; name=&quot;code&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;Now that we have Mootools capturing the click event, lets make our &quot;box&quot; div fade in and out on each click.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;&quot; name=&quot;code&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;$(&#39;box&#39;).fade(&#39;toggle&#39;);&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
Now, when we click our link the box div should fade away. If we click the link again it will reappear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Fading is cool and all, but lets add some style to the box and see if we can make it grow!&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;css&quot; name=&quot;code&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&amp;lt;style type=&quot;text/css&quot;&amp;gt;

   #box{
    width: 100px;
    background: yellow;
   }
&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: monospace; font-size: 12px; line-height: 18px; white-space: pre;&quot;&gt;  &amp;lt;/style&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
We are going to use the tween() function to animate some attributes of our &quot;box&quot; div.&lt;br /&gt;
Inside our click event lets remove out fade() function and replace it with tween().&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;javascript&quot; name=&quot;code&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;//$(&#39;box&#39;).fade(&#39;toggle&#39;);
  $(&#39;box&#39;).tween(&#39;height&#39;, &#39;200&#39;);&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
Now if we click the link, our box should grow taller.&lt;br /&gt;
The tween function takes 2 arguments. The first is the attribute we want to manipulate and the second is a value. We want to change the height of the box and we want it to animate to 200px.&lt;br /&gt;
What if we wanted the box to grow by 10px every time we clicked the link. First we would have to get the current height of the box. I think we can do that with our $() getter function.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;javascript&quot; name=&quot;code&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #42423d; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;var box = $(&#39;box&#39;);
  var height = box.getHeight();
  var new_height = height + 10;

  box.tween(&#39;height&#39;, new_height);&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
First we assign our &quot;box&quot; div to a variable of box. Next we use a built in function of Mootools called getHeight() to get the current height of our &quot;box&quot; div. We want the box to grow by 10px each time the link is clicked so we create a new variable called new_height and assign it a value of height + 10. This is taking the current height and increasing it by 10. Finally we attach the tween() function to our box variable, tell it we want to animate the height and pass it the value of new_height.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you click the link, the box should grow. If you click it again it will continue to grow with each mouse click.&lt;br /&gt;
&lt;h2&gt;We should document this!&lt;/h2&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://4.bp.blogspot.com/-dMTYZowilng/TaZ-lG_cyEI/AAAAAAAAAkk/ZqzD-i4KkXE/s1600/8.png&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-dMTYZowilng/TaZ-lG_cyEI/AAAAAAAAAkk/ZqzD-i4KkXE/s1600/8.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Mootools has an extensive document section on their website. &lt;a href=&quot;http://mootools.net/docs/core&quot;&gt;http://Mootools.net/docs/core&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
If you plan on using Mootools you will become very familiar with this section of their site. It is broken up into the different available classes and functions that Mootools has to offer.&lt;br /&gt;
&lt;br /&gt;
The section that you will be visiting the most will be the Element section. This is the section that has all the information on how Mootools communicates and manipulates the elements on the page.&lt;br /&gt;
&lt;br /&gt;
I&#39;ve given your broad strokes to help you get used to how Mootools functions and if you would like to continue learning I suggest you read over a few of the pages in the Mootools docs.&lt;br /&gt;
&lt;br /&gt;
Link download source code :&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.mediafire.com/file/dz5sk66dh47ybqw/wdeveloper.blogspot.com_beginners_guide_to_mootools.zip&quot;&gt;http://www.mediafire.com/file/dz5sk66dh47ybqw/wdeveloper.blogspot.com_beginners_guide_to_mootools.zip&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wdeveloper.blogspot.com/feeds/7278518913155704893/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/tut-beginners-guide-to-mootools.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/7278518913155704893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/7278518913155704893'/><link rel='alternate' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/tut-beginners-guide-to-mootools.html' title='[TUT] A Beginner&#39;s Guide to Mootools'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-IXqr0cknSAw/TaZ-lhHuVoI/AAAAAAAAAko/ZDxVLRBa8I4/s72-c/preview.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5766888573580627794.post-1280631229739939158</id><published>2011-04-13T21:48:00.000-07:00</published><updated>2011-04-14T05:38:50.471-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Tuts"/><title type='text'>[TUT] OOP Advance: All About the &#39;Static&#39; Keyword</title><content type='html'>&lt;h2 style=&quot;color: #27221f; font-family: Helvetica, Arial, sans-serif; font-size: 36px; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; padding-bottom: 20px;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-HzaLFOQ3sUw/TaZ7pMrBHKI/AAAAAAAAAj8/ukGtWfUj5I0/s1600/preview.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-HzaLFOQ3sUw/TaZ7pMrBHKI/AAAAAAAAAj8/ukGtWfUj5I0/s1600/preview.jpg&quot; /&gt;&lt;/a&gt;All About the &#39;Static&#39; Keyword&lt;/h2&gt;&lt;h4 style=&quot;color: #27221f; font-family: Helvetica, Arial, sans-serif; font-size: 16px; letter-spacing: 0px; line-height: 1.1em; margin-top: 0px;&quot;&gt;By: Burak Guzel&lt;/h4&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 60px;&quot;&gt;&lt;a href=&quot;http://net.tutsplus.com/articles/news/new-premium-tutorial-all-about-the-%E2%80%9Cstatic%E2%80%9D-keyword/&quot;&gt;http://net.tutsplus.com/articles/news/new-premium-tutorial-all-about-the-%E2%80%9Cstatic%E2%80%9D-keyword&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Today we are going to learn how to use the &#39;static&#39; keyword in PHP. We are going go over the basics and build some examples. It is time to add this interesting language feature to your web development bag of tricks.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-height: 60px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #27221f; font-family: Helvetica, Arial, sans-serif; font-size: 36px; font-weight: bold; letter-spacing: -1px; line-height: 39px;&quot;&gt;Tutorial Details&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px;&quot;&gt;&lt;li style=&quot;margin-bottom: 6px;&quot;&gt;&lt;b&gt;Language&lt;/b&gt;: PHP&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 6px;&quot;&gt;&lt;b&gt;Version&lt;/b&gt;: 5+&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 6px;&quot;&gt;&lt;b&gt;Difficulty:&lt;/b&gt;&amp;nbsp;Intermediate&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 6px;&quot;&gt;&lt;b&gt;Estimated Completion Time:&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/b&gt;&amp;nbsp;1 hour&lt;/li&gt;
&lt;/ul&gt;&lt;hr style=&quot;background-attachment: initial; background-clip: initial; background-color: #dfdfdf; background-image: initial; background-origin: initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; clear: both; color: #42423d; display: block; font-family: Arial; font-size: 12px; height: 1px; line-height: 18px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 30px; width: 600px;&quot; /&gt;&lt;h2 style=&quot;color: #27221f; font-family: Helvetica, Arial, sans-serif; font-size: 36px; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; padding-bottom: 20px;&quot;&gt;&lt;span style=&quot;color: #5f5f5f; font-size: 30px;&quot;&gt;1&lt;/span&gt;&amp;nbsp;A Quick Example&lt;/h2&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Let&#39;s stay with a quick example first, to see the effect of using the static keyword.&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Imagine writing a function that remembers how many times total it has been called. If you are not familiar with the &#39;static&#39; keyword, you may resort to using some global variable:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; color: #42423d; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; line-height: 18px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;padding-left: 40px;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px;&quot;&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$call_me_count&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;0;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;call_me()&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;global&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$call_me_count&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$call_me_count&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;++;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;You&amp;nbsp;called&amp;nbsp;me&amp;nbsp;$call_me_count&amp;nbsp;times&amp;nbsp;&amp;lt;br&amp;gt;\n&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;output&amp;nbsp;=&amp;gt;&amp;nbsp;You&amp;nbsp;called&amp;nbsp;me&amp;nbsp;1&amp;nbsp;times&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;call_me();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;output&amp;nbsp;=&amp;gt;&amp;nbsp;You&amp;nbsp;called&amp;nbsp;me&amp;nbsp;2&amp;nbsp;times&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;call_me();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;output&amp;nbsp;=&amp;gt;&amp;nbsp;You&amp;nbsp;called&amp;nbsp;me&amp;nbsp;3&amp;nbsp;times&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;call_me();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;output&amp;nbsp;=&amp;gt;&amp;nbsp;You&amp;nbsp;called&amp;nbsp;me&amp;nbsp;4&amp;nbsp;times&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;call_me();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Just because this works does not mean you should write code this way. Generally speaking, global variables are frowned upon. It&#39;s not a good idea to have global variables floating around, that some function only utilize privately.&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Now enter the &#39;static&#39; keyword. Same code can be rewritten like this:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; color: #42423d; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; line-height: 18px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;padding-left: 40px;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px;&quot;&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;call_me()&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;a&amp;nbsp;static&amp;nbsp;variable&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$call_me_count&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;0;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$call_me_count&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;++;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;You&amp;nbsp;called&amp;nbsp;me&amp;nbsp;$call_me_count&amp;nbsp;times&amp;nbsp;&amp;lt;br&amp;gt;\n&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;output&amp;nbsp;=&amp;gt;&amp;nbsp;You&amp;nbsp;called&amp;nbsp;me&amp;nbsp;1&amp;nbsp;times&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;call_me();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;output&amp;nbsp;=&amp;gt;&amp;nbsp;You&amp;nbsp;called&amp;nbsp;me&amp;nbsp;2&amp;nbsp;times&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;call_me();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;output&amp;nbsp;=&amp;gt;&amp;nbsp;You&amp;nbsp;called&amp;nbsp;me&amp;nbsp;3&amp;nbsp;times&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;call_me();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;output&amp;nbsp;=&amp;gt;&amp;nbsp;You&amp;nbsp;called&amp;nbsp;me&amp;nbsp;4&amp;nbsp;times&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;call_me();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Same result, no more global variables. But how does this work exactly?&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Normally, all local variables inside of a function get destroyed once the function returns. The &#39;static&#39; keywords lets PHP know to keep the variable alive. So, the next time the function is called, the value inside the variable is retained.&lt;/div&gt;&lt;hr style=&quot;background-attachment: initial; background-clip: initial; background-color: #dfdfdf; background-image: initial; background-origin: initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; clear: both; color: #42423d; display: block; font-family: Arial; font-size: 12px; height: 1px; line-height: 18px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 30px; width: 600px;&quot; /&gt;&lt;h2 style=&quot;color: #27221f; font-family: Helvetica, Arial, sans-serif; font-size: 36px; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; padding-bottom: 20px;&quot;&gt;&lt;span style=&quot;color: #5f5f5f; font-size: 30px;&quot;&gt;2&lt;/span&gt;&amp;nbsp;Valid Initial Values&lt;/h2&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;As seen the previous example, when we assigned the value of 0 to the variable, it actually did not execute an assignment statement. It only set the initial value for the variable. That may sound like the same thing, but there is a slight difference. The variable can only be initialized to a fixed value, and not an expression.&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Let&#39;s see some examples of valid and invalid initial values. First, let&#39;s look at numbers:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; color: #42423d; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; line-height: 18px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;padding-left: 40px;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px;&quot;&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;foo()&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;valid&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;9;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;causes&amp;nbsp;parse&amp;nbsp;error&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;sqrt(81);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;valid&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;3.14;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;causes&amp;nbsp;parse&amp;nbsp;error&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;pi();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;causes&amp;nbsp;parse&amp;nbsp;error&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;1&amp;nbsp;+&amp;nbsp;3;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;As you can see, not even basic math operations are allowed. All you can assign is fixed numbers.&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;We can also assign strings:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; color: #42423d; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; line-height: 18px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;padding-left: 40px;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px;&quot;&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;foo()&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;valid&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;valid&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;hello&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;causes&amp;nbsp;parse&amp;nbsp;error&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;strtoupper&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;hello&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;causes&amp;nbsp;parse&amp;nbsp;error&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;hello&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;world&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Again, it has to be fixed strings, and not even basic concatenation is allowed.&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Booleans, Arrays and Constants will work too:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; color: #42423d; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; line-height: 18px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;padding-left: 40px;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px;&quot;&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;define(&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;SOME_CONSTANT&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;789);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;foo()&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;valid&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;array&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;(1,2,3);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;valid&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;SOME_CONSTANT;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;valid&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;array&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;(1,2,&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;three&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;array&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;(&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;foo&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;bar&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;valid&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;true;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;hr style=&quot;background-attachment: initial; background-clip: initial; background-color: #dfdfdf; background-image: initial; background-origin: initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; clear: both; color: #42423d; display: block; font-family: Arial; font-size: 12px; height: 1px; line-height: 18px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 30px; width: 600px;&quot; /&gt;&lt;h2 style=&quot;color: #27221f; font-family: Helvetica, Arial, sans-serif; font-size: 36px; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; padding-bottom: 20px;&quot;&gt;&lt;span style=&quot;color: #5f5f5f; font-size: 30px;&quot;&gt;3&lt;/span&gt;&amp;nbsp;Building an Alternate() Function&lt;/h2&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Now that we know how static variables inside functions work, let&#39;s build something useful with it.&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Here is a simple HTML page with a simple table in it:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; color: #42423d; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; line-height: 18px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;padding-left: 40px;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px;&quot;&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-xml&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;My&amp;nbsp;Table&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;meta&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;attribute&quot; style=&quot;color: red;&quot;&gt;charset&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;attribute-value&quot; style=&quot;color: blue;&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;table&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;thead&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;tr&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;th&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;th&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;th&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;Name&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;th&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;th&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;Category&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;th&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;tr&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;thead&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;tbody&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;tr&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;Apple&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;Fruit&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;tr&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;tr&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;Carrot&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;Vegetable&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;tr&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;tr&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;Dog&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;Animal&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;tr&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;tr&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;Oven&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;Appliance&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;tr&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;tbody&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;table&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;The result is:&lt;/div&gt;&lt;div class=&quot;tutorial_image&quot; style=&quot;background-color: #f9f9f9; border-bottom-color: rgb(214, 211, 202); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 211, 202); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 211, 202); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 211, 202); border-top-style: solid; border-top-width: 1px; color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 10px; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/1.png&quot; style=&quot;border-bottom-color: rgb(203, 203, 203); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(203, 203, 203); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(203, 203, 203); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(203, 203, 203); border-top-style: solid; border-top-width: 1px; max-width: 100%;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Now let&#39;s add some css, and make the rows alternate color:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; color: #42423d; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; line-height: 18px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;padding-left: 40px;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px;&quot;&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-xml&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;My&amp;nbsp;Table&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;meta&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;attribute&quot; style=&quot;color: red;&quot;&gt;charset&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;attribute-value&quot; style=&quot;color: blue;&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;table&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;width:&amp;nbsp;300px;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;tr.odd&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;background-color:&amp;nbsp;#DDD;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;tr.even&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;background-color:&amp;nbsp;#BBB;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;body&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;font-family:&amp;nbsp;Arial;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;table&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;thead&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;tr&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;th&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;th&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;th&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;Name&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;th&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;th&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;Category&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;th&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;tr&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;thead&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;tbody&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;tr&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;attribute&quot; style=&quot;color: red;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;attribute-value&quot; style=&quot;color: blue;&quot;&gt;&quot;odd&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;Apple&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;Fruit&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;tr&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;tr&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;attribute&quot; style=&quot;color: red;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;attribute-value&quot; style=&quot;color: blue;&quot;&gt;&quot;even&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;Carrot&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;Vegetable&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;tr&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;tr&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;attribute&quot; style=&quot;color: red;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;attribute-value&quot; style=&quot;color: blue;&quot;&gt;&quot;odd&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;Dog&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;Animal&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;tr&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;tr&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;attribute&quot; style=&quot;color: red;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;attribute-value&quot; style=&quot;color: blue;&quot;&gt;&quot;even&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;Oven&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;Appliance&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;tr&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;tbody&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;tag-name&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;table&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Now it looks like this:&lt;/div&gt;&lt;div class=&quot;tutorial_image&quot; style=&quot;background-color: #f9f9f9; border-bottom-color: rgb(214, 211, 202); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 211, 202); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 211, 202); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 211, 202); border-top-style: solid; border-top-width: 1px; color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 10px; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-nau3qkNamks/TaZ8Pq1d_aI/AAAAAAAAAkE/6eumlWYRyj0/s1600/2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;202&quot; src=&quot;http://2.bp.blogspot.com/-nau3qkNamks/TaZ8Pq1d_aI/AAAAAAAAAkE/6eumlWYRyj0/s400/2.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;img border=&quot;0&quot; src=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/2.png&quot; style=&quot;border-bottom-color: rgb(203, 203, 203); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(203, 203, 203); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(203, 203, 203); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(203, 203, 203); border-top-style: solid; border-top-width: 1px; max-width: 100%;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;If the data was coming from a database, and the table rows were output within a loop, you would need to add some code to be able to set those alternating CSS classes to each row. Most people would just go ahead and create a variable within that loop, add a conditional or ternary statement to keep alternating its value.&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;However, we are going to build a more elegant and reusable solution. We are going to create a function named alternate() that utilizes the concept of static variables.&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; color: #42423d; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; line-height: 18px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;padding-left: 40px;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px;&quot;&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-xml&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;function&amp;nbsp;alternate($a,&amp;nbsp;$b)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;static&amp;nbsp;$&lt;span class=&quot;attribute&quot; style=&quot;color: red;&quot;&gt;alt&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;attribute-value&quot; style=&quot;color: blue;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//&amp;nbsp;reverse&amp;nbsp;the&amp;nbsp;value&amp;nbsp;of&amp;nbsp;alt&amp;nbsp;(true&amp;nbsp;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;false)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$&lt;span class=&quot;attribute&quot; style=&quot;color: red;&quot;&gt;alt&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;!$alt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;($alt)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;$a;&amp;nbsp;//&amp;nbsp;return&amp;nbsp;first&amp;nbsp;value&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;else&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;$b;&amp;nbsp;//&amp;nbsp;return&amp;nbsp;second&amp;nbsp;value&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;//&amp;nbsp;Example&amp;nbsp;Usage:&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;//&amp;nbsp;output:&amp;nbsp;odd&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;echo&amp;nbsp;alternate(&#39;odd&#39;,&amp;nbsp;&#39;even&#39;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;//&amp;nbsp;output:&amp;nbsp;even&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;echo&amp;nbsp;alternate(&#39;odd&#39;,&amp;nbsp;&#39;even&#39;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;//&amp;nbsp;output:&amp;nbsp;odd&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;echo&amp;nbsp;alternate(&#39;odd&#39;,&amp;nbsp;&#39;even&#39;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;We call the function with two arguments. Every time it is called, it returns back one of the arguments in an alternating fashion. It accomplishes this by keeping a boolean value in a static variable called $alt. Every time it flips this variables value, to determine which one of the two arguments to return.&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;So, let&#39;s use that in our page, by putting it all together:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; color: #42423d; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; line-height: 18px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;padding-left: 40px;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px;&quot;&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;lt;!--?php&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;alternate(&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$b&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$alt&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;false;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;reverse&amp;nbsp;the&amp;nbsp;value&amp;nbsp;of&amp;nbsp;alt&amp;nbsp;(true&amp;nbsp;&amp;lt;=--&amp;gt;&amp;nbsp;false)&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$alt&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;!&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$alt&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;(&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$alt&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;return&amp;nbsp;first&amp;nbsp;value&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$b&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;return&amp;nbsp;second&amp;nbsp;value&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$rows&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;array&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;(&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;array&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;(1,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;Apple&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;Fruit&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;),&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;array&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;(2,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;Carrot&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;Vegetable&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;),&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;array&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;(3,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;Dog&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;Animal&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;),&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;array&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;(4,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;Oven&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;Appliance&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;)&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;?&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;title&amp;gt;My&amp;nbsp;Table&amp;lt;/title&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;meta&amp;nbsp;charset=&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;style&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;table&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;width:&amp;nbsp;300px;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;tr.odd&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;background-color:&amp;nbsp;#DDD;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;tr.even&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;background-color:&amp;nbsp;#BBB;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;body&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;font-family:&amp;nbsp;Arial;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/style&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;lt;table&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;thead&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;tr&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;th&amp;gt;ID&amp;lt;/th&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;th&amp;gt;Name&amp;lt;/th&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;th&amp;gt;Category&amp;lt;/th&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/tr&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/thead&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;tbody&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;!--?php&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;(&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$rows&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$row&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;):&amp;nbsp;?--&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;tr&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;?php&amp;nbsp;echo&amp;nbsp;alternate(&#39;odd&#39;,&#39;even&#39;);&amp;nbsp;?&amp;gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;td&amp;gt;&amp;lt;!--?php&amp;nbsp;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;implode(&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;&amp;lt;/td--&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$row&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&amp;nbsp;?&amp;gt;&amp;lt;/td&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/tr&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;!--?php&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;endforeach&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;?--&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/tbody&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;lt;/table&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;And the final result is the same:&lt;/div&gt;&lt;div class=&quot;tutorial_image&quot; style=&quot;background-color: #f9f9f9; border-bottom-color: rgb(214, 211, 202); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(214, 211, 202); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(214, 211, 202); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(214, 211, 202); border-top-style: solid; border-top-width: 1px; color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 10px; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/2.png&quot; style=&quot;border-bottom-color: rgb(203, 203, 203); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(203, 203, 203); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(203, 203, 203); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(203, 203, 203); border-top-style: solid; border-top-width: 1px; max-width: 100%;&quot; /&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-nau3qkNamks/TaZ8Pq1d_aI/AAAAAAAAAkE/6eumlWYRyj0/s1600/2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;202&quot; src=&quot;http://2.bp.blogspot.com/-nau3qkNamks/TaZ8Pq1d_aI/AAAAAAAAAkE/6eumlWYRyj0/s400/2.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;hr style=&quot;background-attachment: initial; background-clip: initial; background-color: #dfdfdf; background-image: initial; background-origin: initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; clear: both; color: #42423d; display: block; font-family: Arial; font-size: 12px; height: 1px; line-height: 18px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 30px; width: 600px;&quot; /&gt;&lt;h2 style=&quot;color: #27221f; font-family: Helvetica, Arial, sans-serif; font-size: 36px; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; padding-bottom: 20px;&quot;&gt;&lt;span style=&quot;color: #5f5f5f; font-size: 30px;&quot;&gt;4&lt;/span&gt;&amp;nbsp;Improving Our Alternate() Function&lt;/h2&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;The function we created works well, if we use it only in one spot in our scripts. There is a small problem with it, however. If we use it in multiple places, or in nested loops, it may not return the values in the order we intended. Let&#39;s look this code to demonstrate this issue:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; color: #42423d; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; line-height: 18px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;padding-left: 40px;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px;&quot;&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;alternate(&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;a&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;b&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;)&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;br&amp;gt;\n&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;b&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;alternate(&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;a&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;b&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;)&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;br&amp;gt;\n&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;alternate(&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;a&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;b&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;)&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;br&amp;gt;\n&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;even&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;(the&amp;nbsp;second&amp;nbsp;value&amp;nbsp;is&amp;nbsp;returned&amp;nbsp;first!)&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;alternate(&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;odd&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;even&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;)&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;br&amp;gt;\n&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;odd&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;alternate(&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;odd&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;even&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;)&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;br&amp;gt;\n&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;bar&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;(same&amp;nbsp;problem)&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;alternate(&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;foo&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;bar&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;)&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;br&amp;gt;\n&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;(last&amp;nbsp;time&amp;nbsp;it&amp;nbsp;was&amp;nbsp;&#39;a&#39;&amp;nbsp;too)&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;alternate(&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;a&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;b&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;)&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;br&amp;gt;\n&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Our function needs to be aware that it is being called from different places, and make sure to return the values accordingly. We can accomplish this by adding an optional last parameter, to assign an ID number. And we pass a unique ID from each different place we call it from, to avoid these conflicts:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; color: #42423d; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; line-height: 18px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;padding-left: 40px;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px;&quot;&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;alternate(&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$b&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$id&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;0)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$alt&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;array&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;(!isset(&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$alt&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$id&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;]))&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$alt&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$id&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;]&amp;nbsp;=&amp;nbsp;false;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$alt&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$id&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;]&amp;nbsp;=&amp;nbsp;!&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$alt&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$id&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;];&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;(&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$alt&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$id&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;])&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$b&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;alternate(&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;a&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;b&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;1)&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;br&amp;gt;\n&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;b&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;alternate(&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;a&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;b&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;1)&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;br&amp;gt;\n&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;alternate(&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;a&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;b&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;1)&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;br&amp;gt;\n&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;odd&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;alternate(&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;odd&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;even&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;2)&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;br&amp;gt;\n&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;even&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;alternate(&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;odd&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;even&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;2)&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;br&amp;gt;\n&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;foo&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;alternate(&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;foo&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;bar&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;3)&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;br&amp;gt;\n&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;b&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;alternate(&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;a&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;b&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;1)&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;lt;br&amp;gt;\n&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;This time we are utilizing an array as a static variable. It will carry a unique boolean value for each different ID number that was passed. This allows it to return the values in correct order.&lt;/div&gt;&lt;hr style=&quot;background-attachment: initial; background-clip: initial; background-color: #dfdfdf; background-image: initial; background-origin: initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; clear: both; color: #42423d; display: block; font-family: Arial; font-size: 12px; height: 1px; line-height: 18px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 30px; width: 600px;&quot; /&gt;&lt;h2 style=&quot;color: #27221f; font-family: Helvetica, Arial, sans-serif; font-size: 36px; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; padding-bottom: 20px;&quot;&gt;&lt;span style=&quot;color: #5f5f5f; font-size: 30px;&quot;&gt;5&lt;/span&gt;&amp;nbsp;Static Class Members&lt;/h2&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;The &#39;static&#39; keyword is not only used inside functions. It is actually quite common in object oriented programming. There can be static members, and methods. First we are going to look at how static members work.&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Here is the syntax:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; color: #42423d; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; line-height: 18px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;padding-left: 40px;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px;&quot;&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;Foo&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;a&amp;nbsp;static&amp;nbsp;member&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;0;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;a&amp;nbsp;normal&amp;nbsp;member&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$b&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;0;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;bar()&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;accessing&amp;nbsp;the&amp;nbsp;static&amp;nbsp;member&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self::&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self::&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;++;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self::&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;3;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;normal&amp;nbsp;member:&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;-&amp;gt;b;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;-&amp;gt;b++;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;-&amp;gt;b&amp;nbsp;=&amp;nbsp;3;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;accessing&amp;nbsp;the&amp;nbsp;static&amp;nbsp;member&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;from&amp;nbsp;outside&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Foo::&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Foo::&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;++;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Foo::&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;3;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$obj&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;Foo();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;accessing&amp;nbsp;the&amp;nbsp;normal&amp;nbsp;member&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$obj&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;-&amp;gt;b;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$obj&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;-&amp;gt;b++;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$obj&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;-&amp;gt;b&amp;nbsp;=&amp;nbsp;3;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Note how we used the &#39;self::&#39; keyword in front of the static variable for accessing it within the class, rather than &#39;$this&#39;. Also, when used in the outer scope, we do not need to create an instance of the object before we can access the static variables. However, normal class members can only be accessed after we created an instance of them.&lt;/div&gt;&lt;hr style=&quot;background-attachment: initial; background-clip: initial; background-color: #dfdfdf; background-image: initial; background-origin: initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; clear: both; color: #42423d; display: block; font-family: Arial; font-size: 12px; height: 1px; line-height: 18px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 30px; width: 600px;&quot; /&gt;&lt;h2 style=&quot;color: #27221f; font-family: Helvetica, Arial, sans-serif; font-size: 36px; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; padding-bottom: 20px;&quot;&gt;&lt;span style=&quot;color: #5f5f5f; font-size: 30px;&quot;&gt;6&lt;/span&gt;&amp;nbsp;A Class That Counts Itself&lt;/h2&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Remember our first example where we had a function that kept a count on how many times it was called? Now let&#39;s apply the same principle to object oriented programming.&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;This class will have the ability to count how many times total it has been created:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; color: #42423d; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; line-height: 18px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;padding-left: 40px;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px;&quot;&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;Foo&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;our&amp;nbsp;instance&amp;nbsp;counter&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$counter&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;0;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;to&amp;nbsp;work&amp;nbsp;as&amp;nbsp;an&amp;nbsp;autoincrement&amp;nbsp;ID&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$id&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;0;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;the&amp;nbsp;constructor&amp;nbsp;function&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;__construct()&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;increment&amp;nbsp;counter&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self::&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$counter&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;++;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;save&amp;nbsp;the&amp;nbsp;same&amp;nbsp;number&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;as&amp;nbsp;the&amp;nbsp;id&amp;nbsp;of&amp;nbsp;this&amp;nbsp;object&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;-&amp;gt;id&amp;nbsp;=&amp;nbsp;self::&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$counter&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;output:&amp;nbsp;0&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;Foo::&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$counter&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;\n&amp;lt;br&amp;gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;Foo();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;output:&amp;nbsp;1&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;Foo::&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$counter&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;\n&amp;lt;br&amp;gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$b&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;Foo();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;output:&amp;nbsp;2&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;Foo::&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$counter&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;\n&amp;lt;br&amp;gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$c&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;Foo();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;output:&amp;nbsp;3&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;Foo::&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$counter&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;\n&amp;lt;br&amp;gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;output:&amp;nbsp;2&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$b&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;-&amp;gt;id;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Every time a new object is created, the constructor function is called by default. This function contains code for setting the counter and the id number for that instance of the object. So, if an object was created for the third time, that object will have an id of 3, which is specific only to that object. The counter will keep going up as more objects keep getting created.&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Note that regular class members exist separately on each object. However, the static members only exist once globally.&lt;/div&gt;&lt;hr style=&quot;background-attachment: initial; background-clip: initial; background-color: #dfdfdf; background-image: initial; background-origin: initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; clear: both; color: #42423d; display: block; font-family: Arial; font-size: 12px; height: 1px; line-height: 18px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 30px; width: 600px;&quot; /&gt;&lt;h2 style=&quot;color: #27221f; font-family: Helvetica, Arial, sans-serif; font-size: 36px; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; padding-bottom: 20px;&quot;&gt;&lt;span style=&quot;color: #5f5f5f; font-size: 30px;&quot;&gt;7&lt;/span&gt;&amp;nbsp;Static Class Methods&lt;/h2&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Not just members, but also methods of a Class can be made &#39;static&#39;.&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; color: #42423d; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; line-height: 18px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;padding-left: 40px;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px;&quot;&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;Foo&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;note&amp;nbsp;the&amp;nbsp;static&amp;nbsp;keyword&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;hello()&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;Hello&amp;nbsp;World&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;And this is how you can call them:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; color: #42423d; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; line-height: 18px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;padding-left: 40px;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px;&quot;&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Foo::hello();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;prints&amp;nbsp;Hello&amp;nbsp;World&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Note how the syntax is similar to accessing static members, by using double colon (::).&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Inside of a static method, a class can refer to itself using the &#39;self&#39; keyword, and access static members this way:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; color: #42423d; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; line-height: 18px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;padding-left: 40px;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px;&quot;&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;Foo&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$call_me_count&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;0;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;call_me()&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self::&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$call_me_count&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;++;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;You&amp;nbsp;called&amp;nbsp;me&amp;nbsp;&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;.self::&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$call_me_count&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;&amp;nbsp;times&amp;nbsp;&amp;lt;br&amp;gt;\n&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;output&amp;nbsp;=&amp;gt;&amp;nbsp;You&amp;nbsp;called&amp;nbsp;me&amp;nbsp;1&amp;nbsp;times&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Foo::call_me();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;output&amp;nbsp;=&amp;gt;&amp;nbsp;You&amp;nbsp;called&amp;nbsp;me&amp;nbsp;2&amp;nbsp;times&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Foo::call_me();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;output&amp;nbsp;=&amp;gt;&amp;nbsp;You&amp;nbsp;called&amp;nbsp;me&amp;nbsp;3&amp;nbsp;times&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Foo::call_me();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;output&amp;nbsp;=&amp;gt;&amp;nbsp;You&amp;nbsp;called&amp;nbsp;me&amp;nbsp;4&amp;nbsp;times&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Foo::call_me();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;hr style=&quot;background-attachment: initial; background-clip: initial; background-color: #dfdfdf; background-image: initial; background-origin: initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; clear: both; color: #42423d; display: block; font-family: Arial; font-size: 12px; height: 1px; line-height: 18px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 30px; width: 600px;&quot; /&gt;&lt;h2 style=&quot;color: #27221f; font-family: Helvetica, Arial, sans-serif; font-size: 36px; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; padding-bottom: 20px;&quot;&gt;&lt;span style=&quot;color: #5f5f5f; font-size: 30px;&quot;&gt;8&lt;/span&gt;&amp;nbsp;The Singleton Pattern&lt;/h2&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;A &#39;Singleton&#39; is a class that can have only exist as a single object instance. It also contains a static reference to this instance.&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;It might become more clear by looking at the code:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; color: #42423d; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; line-height: 18px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;padding-left: 40px;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px;&quot;&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;Foo&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;to&amp;nbsp;contain&amp;nbsp;an&amp;nbsp;instance&amp;nbsp;of&amp;nbsp;Foo&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$instance&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;making&amp;nbsp;constructor&amp;nbsp;private,&amp;nbsp;so&amp;nbsp;it&amp;nbsp;can&#39;t&amp;nbsp;be&amp;nbsp;called&amp;nbsp;from&amp;nbsp;outside&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;__construct()&amp;nbsp;{}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;the&amp;nbsp;singleton&amp;nbsp;method&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;getInstance()&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;if&amp;nbsp;the&amp;nbsp;instance&amp;nbsp;doesn&#39;t&amp;nbsp;exist&amp;nbsp;yet,&amp;nbsp;create&amp;nbsp;it&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;(!isset(self::&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$instance&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;))&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$c&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;__CLASS__&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self::&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$instance&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$c&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;return&amp;nbsp;the&amp;nbsp;only&amp;nbsp;instance&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;self::&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$instance&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;cloning&amp;nbsp;is&amp;nbsp;not&amp;nbsp;allowed&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;__clone()&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;trigger_error(&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;Cloning&amp;nbsp;is&amp;nbsp;not&amp;nbsp;allowed.&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;E_USER_ERROR);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;This is the skeleton structure. You can of course add more methods and member, or simply extend the class.&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;When we call the getInstance() method, two things happen.&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; color: #42423d; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; line-height: 18px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;padding-left: 40px;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px;&quot;&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$var&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;Foo::getInstance();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;First, if there is no Foo object, one is created and assigned to Foo::$instance. Then, once there is that object, it is returned, so $var becomes that object. If you call it multiple times, every time you will get the same exact object; a new instance will not be created.&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; color: #42423d; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; line-height: 18px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;padding-left: 40px;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px;&quot;&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$var&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;Foo::getInstance();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$var2&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;Foo::getInstance();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;$var&amp;nbsp;and&amp;nbsp;$var2&amp;nbsp;reference&amp;nbsp;the&amp;nbsp;same&amp;nbsp;exact&amp;nbsp;object&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Since we made the __construct() method private, we can not create new instances of this object.&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; color: #42423d; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; line-height: 18px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;padding-left: 40px;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px;&quot;&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;this&amp;nbsp;will&amp;nbsp;throw&amp;nbsp;an&amp;nbsp;error&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$var&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;Foo();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;hr style=&quot;background-attachment: initial; background-clip: initial; background-color: #dfdfdf; background-image: initial; background-origin: initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; clear: both; color: #42423d; display: block; font-family: Arial; font-size: 12px; height: 1px; line-height: 18px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 30px; width: 600px;&quot; /&gt;&lt;h2 style=&quot;color: #27221f; font-family: Helvetica, Arial, sans-serif; font-size: 36px; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; padding-bottom: 20px;&quot;&gt;&lt;span style=&quot;color: #5f5f5f; font-size: 30px;&quot;&gt;9&lt;/span&gt;&amp;nbsp;A Singleton CurrentUser Class&lt;/h2&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Now it&#39;s time to build a more concrete example with the Singleton Pattern.&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Imagine that you have a User class with various methods:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; color: #42423d; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; line-height: 18px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;padding-left: 40px;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px;&quot;&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;User&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$id&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$name&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$email&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;load_user(&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$id&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;fetch&amp;nbsp;from&amp;nbsp;db&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;...&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;update_user(&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$info&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;update&amp;nbsp;db&amp;nbsp;with&amp;nbsp;given&amp;nbsp;$info&amp;nbsp;array&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;...&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;comment_count()&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;calculate&amp;nbsp;the&amp;nbsp;number&amp;nbsp;of&amp;nbsp;comments&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;...&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;We have one method for fetching a user by id from the database. So it could be used like this:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; color: #42423d; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; line-height: 18px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;padding-left: 40px;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px;&quot;&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$user&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;User();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$user&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;-&amp;gt;load_user(&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$user_id&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;now&amp;nbsp;I&amp;nbsp;can&amp;nbsp;see&amp;nbsp;the&amp;nbsp;name,&amp;nbsp;and&amp;nbsp;other&amp;nbsp;things&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$user&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;-&amp;gt;name;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$user&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;-&amp;gt;comment_count();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Now imagine that once a user is logged in, you store their id in the session. And next time they load a page, you need to look up that id, and create the related $user object for that user again, if you wish to access the members and methods of that object.&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;But due to variable scope issues, you will either need to make the $user object global, or keep initializing it from different functions/methods within your script. Here is where a singleton class can come in handy:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; color: #42423d; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; line-height: 18px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;padding-left: 40px;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px;&quot;&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;CurrentUser&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;extends&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;User&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$instance&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;__construct()&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;make&amp;nbsp;sure&amp;nbsp;to&amp;nbsp;call&amp;nbsp;parent&amp;nbsp;constructor&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;parent::__construct();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;getInstance()&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;initialize&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;(!isset(self::&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$instance&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;))&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;comment&quot; style=&quot;color: #008200;&quot;&gt;//&amp;nbsp;does&amp;nbsp;session&amp;nbsp;exist?&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;(!&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$_SESSION&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;user_id&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;])&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;false;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$c&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;__CLASS__&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self::&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$instance&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$c&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self::&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$instance&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;-&amp;gt;load_user(&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$_SESSION&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;user_id&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;]);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;self::&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$instance&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;__clone()&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;trigger_error(&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&#39;Cloning&amp;nbsp;is&amp;nbsp;not&amp;nbsp;allowed.&#39;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;,&amp;nbsp;E_USER_ERROR);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Now we can access the CurrentUser class from everywhere in our application:&lt;/div&gt;&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; color: #42423d; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 12px; line-height: 18px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; overflow-x: auto; overflow-y: auto; padding-top: 1px; width: 594px;&quot;&gt;&lt;div class=&quot;bar&quot; style=&quot;padding-left: 40px;&quot;&gt;&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font: normal normal normal 9px/normal Verdana, Geneva, Arial, Helvetica, sans-serif; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px;&quot;&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;view plain&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;copy to clipboard&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;print&lt;/a&gt;&lt;a href=&quot;file:///D:/Taan/webdeveloper_blogspot/all_about_the_static_keyword/All_about_the_static_keyword.html#&quot; style=&quot;color: #a0a0a0; font-size: 9px; margin-right: 10px; text-decoration: none;&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-c&quot; start=&quot;1&quot; style=&quot;background-color: white; color: #5c5c5c; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$user&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;=&amp;nbsp;CurrentUser::getInstance();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;(!&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$user&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot; style=&quot;color: blue;&quot;&gt;&quot;You&amp;nbsp;are&amp;nbsp;not&amp;nbsp;logged&amp;nbsp;in!&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;}&amp;nbsp;&lt;span class=&quot;keyword&quot; style=&quot;color: #006699; font-weight: bold;&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;func&quot; style=&quot;color: black;&quot;&gt;echo&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;Welcome&amp;nbsp;back&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;vars&quot; style=&quot;color: black;&quot;&gt;$user&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;-&amp;gt;name&quot;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot; style=&quot;background-color: white; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; line-height: 14px; margin-bottom: 0px; padding-left: 10px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;}&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;So, in our code we did not need to worry about dealing with session. We can simply attempt to get the instance of the CurrentUser object and use it just like any User object, as it extends its functionality.&lt;/div&gt;&lt;hr style=&quot;background-attachment: initial; background-clip: initial; background-color: #dfdfdf; background-image: initial; background-origin: initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; clear: both; color: #42423d; display: block; font-family: Arial; font-size: 12px; height: 1px; line-height: 18px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 30px; width: 600px;&quot; /&gt;&lt;h2 style=&quot;color: #27221f; font-family: Helvetica, Arial, sans-serif; font-size: 36px; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; padding-bottom: 20px;&quot;&gt;Conclusion&lt;/h2&gt;&lt;div style=&quot;color: #42423d; font-family: Arial; font-size: 12px; line-height: 18px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;I hope you enjoyed this tutorial and learned from it. See you next time!&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wdeveloper.blogspot.com/feeds/1280631229739939158/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/oop-advance-all-about-static-keyword.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/1280631229739939158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/1280631229739939158'/><link rel='alternate' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/oop-advance-all-about-static-keyword.html' title='[TUT] OOP Advance: All About the &#39;Static&#39; Keyword'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-HzaLFOQ3sUw/TaZ7pMrBHKI/AAAAAAAAAj8/ukGtWfUj5I0/s72-c/preview.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5766888573580627794.post-643585880809437813</id><published>2011-04-13T20:53:00.000-07:00</published><updated>2011-04-14T02:07:47.336-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JQuery Plugin"/><title type='text'>[JQuery Plugin] ImgSlider</title><content type='html'>&lt;b&gt;ImgSlider&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-kIWucK3_NlE/TaZvlApiJEI/AAAAAAAAAj0/BYGnARZ5zG4/s1600/imgslider.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;202&quot; src=&quot;http://1.bp.blogspot.com/-kIWucK3_NlE/TaZvlApiJEI/AAAAAAAAAj0/BYGnARZ5zG4/s400/imgslider.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Live Demo: &lt;a href=&quot;http://codecanyon.net/item/imgslider/full_screen_preview/128727&quot;&gt;http://codecanyon.net/item/imgslider...preview/128727&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Features&lt;br /&gt;
&lt;br /&gt;
Cross-browser compatible. Works in IE 6 , 7, 8, Firefox, Safari, Chrome, Opera&lt;br /&gt;
Degrades gracefully when JavaScript is disabled. Images and CSS styling remain viewable&lt;br /&gt;
Easily add to any existing website or dynamically generated content&lt;br /&gt;
Very easy to customize&lt;br /&gt;
Semantic, valid XHTML and CSS&lt;br /&gt;
Powered by the ever popular jQuery JavaScript library&lt;br /&gt;
Includes detailed documentation&lt;br /&gt;
Less than 2kb in size&lt;br /&gt;
Compatible with jQuery Easing Plugin&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;b&gt;Download&amp;nbsp;imgslider&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://www.mediafire.com/file/l6i2858ju3n42zc/wdeveloper.blogspot.com_ImgSlider.zip&quot;&gt;http://www.mediafire.com/file/l6i2858ju3n42zc/wdeveloper.blogspot.com_ImgSlider.zip&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://wdeveloper.blogspot.com/feeds/643585880809437813/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/jquery-plugin-imgslider.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/643585880809437813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/643585880809437813'/><link rel='alternate' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/jquery-plugin-imgslider.html' title='[JQuery Plugin] ImgSlider'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-kIWucK3_NlE/TaZvlApiJEI/AAAAAAAAAj0/BYGnARZ5zG4/s72-c/imgslider.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5766888573580627794.post-5254296953090629674</id><published>2011-04-13T20:14:00.000-07:00</published><updated>2011-04-14T02:08:17.247-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Templates"/><title type='text'>[Templates] Music Templates</title><content type='html'>&lt;b&gt;Music Templates&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px; font-weight: normal;&quot;&gt;PSD,HTML,CSS | 60.3 Mb&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-xRKr0EYALuY/TaZcemjpw1I/AAAAAAAAAjs/5XhYxAfNfuk/s1600/wdeveloper.blopspot.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;http://4.bp.blogspot.com/-xRKr0EYALuY/TaZcemjpw1I/AAAAAAAAAjs/5XhYxAfNfuk/s640/wdeveloper.blopspot.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;b&gt;Download Music Templates&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;a href=&quot;http://www.mediafire.com/file/yehgsslgv9w5uf3/wdeveloper.blopspot.com_Music%20Templates.rar&quot;&gt;http://www.mediafire.com/file/yehgsslgv9w5uf3/wdeveloper.blopspot.com_Music%20Templates.rar&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wdeveloper.blogspot.com/feeds/5254296953090629674/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/templates-left-handed-obox-design_13.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/5254296953090629674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/5254296953090629674'/><link rel='alternate' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/templates-left-handed-obox-design_13.html' title='[Templates] Music Templates'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-xRKr0EYALuY/TaZcemjpw1I/AAAAAAAAAjs/5XhYxAfNfuk/s72-c/wdeveloper.blopspot.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5766888573580627794.post-6534293604228892340</id><published>2011-04-13T11:48:00.000-07:00</published><updated>2011-04-14T02:09:09.052-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Templates"/><category scheme="http://www.blogger.com/atom/ns#" term="Wordpress"/><title type='text'>[Templates] Left Handed – Obox Design Premium WordPress Theme</title><content type='html'>&lt;div&gt;&lt;b&gt;&amp;nbsp;Left Handed&lt;/b&gt;&lt;/div&gt;Creative bloggers will enjoy the quirky detail of this 2-column hand-drawn theme. Left Handed brings together custom-made fonts, chalky lines and subtle texturing, and turns them into a template suited to any creative theme - including music, art and design.Live demo:&amp;nbsp;&lt;a href=&quot;http://www.obox-design.com/demo-theme.cfm?theme=left-handed&quot;&gt;http://www.obox-design.com/demo-theme.cfm?theme=left-handed&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-LNTOPPHMm90/TaXvY4_uUkI/AAAAAAAAAjU/DczabmnsZrE/s1600/lefthanded-home.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;http://4.bp.blogspot.com/-LNTOPPHMm90/TaXvY4_uUkI/AAAAAAAAAjU/DczabmnsZrE/s640/lefthanded-home.jpg&quot; width=&quot;144&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;b&gt;Download&amp;nbsp;&amp;nbsp;Left Handed&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;a href=&quot;http://www.mediafire.com/file/yrah5banvy8n0e7/wdeveloper.blogspot.com_w_left-handed.rar&quot;&gt;http://www.mediafire.com/file/yrah5banvy8n0e7/wdeveloper.blogspot.com_w_left-handed.rar&lt;/a&gt;&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://wdeveloper.blogspot.com/feeds/6534293604228892340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/templates-left-handed-obox-design.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/6534293604228892340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/6534293604228892340'/><link rel='alternate' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/templates-left-handed-obox-design.html' title='[Templates] Left Handed – Obox Design Premium WordPress Theme'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-LNTOPPHMm90/TaXvY4_uUkI/AAAAAAAAAjU/DczabmnsZrE/s72-c/lefthanded-home.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5766888573580627794.post-2940329527407396694</id><published>2011-04-13T11:28:00.000-07:00</published><updated>2011-04-13T11:28:38.698-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP Script"/><title type='text'>[PHP Script] PHP + ffmpeg video converter</title><content type='html'>&lt;b&gt;PHP + ffmpeg video converter&amp;nbsp;&lt;/b&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-FaEaXiX7RCU/TaXrQUJpH-I/AAAAAAAAAjQ/SvT3B7IXPF8/s1600/video_converter.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;202&quot; src=&quot;http://4.bp.blogspot.com/-FaEaXiX7RCU/TaXrQUJpH-I/AAAAAAAAAjQ/SvT3B7IXPF8/s400/video_converter.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;div&gt;Description:this script is used for converting videos to severeal diferent video formats and audio mp3 format.&lt;br /&gt;
Features:&lt;br /&gt;
1. converts input video to several video formats including audio format mp3&lt;br /&gt;
2. calculate video duration in next format 00:00:00 (hh:mm:ss)&lt;br /&gt;
3. takes picture from video&lt;br /&gt;
4. prevents uploading unsuported files before uploading is startet &lt;br /&gt;
5. user have an option to set quality of video/audio file&lt;br /&gt;
6.suported files: &lt;br /&gt;
input:3gp, avi, mpg, mpeg, mpe4, mov, m4a, mj2, flv, wmv, mp3, ogg, webm&lt;br /&gt;
output: .flv, mp4, avi, wmv, mp3, ogg, webm&lt;br /&gt;
Usage:&lt;br /&gt;
1. start step_1.php&lt;br /&gt;
2. choose your video file and follow instructions&lt;br /&gt;
3. only extensions for videos are enabled for upload – if you choose some non-suported extesnion you will get alert window BEFORE upload is started&lt;br /&gt;
4. Choose output video type and quality settings&lt;br /&gt;
&lt;br /&gt;
5. wait until conversion is over – new video duration is displayed&lt;br /&gt;
6. image for video is created&lt;br /&gt;
7. preview your video / or download link is shown&lt;br /&gt;
8. log file is created for every video conversion and image creation&lt;br /&gt;
Info:&lt;br /&gt;
all uploaded videos are renamed to a name based on a microtime stamp like 0342731001282903919.avi this will make easier for ffmpeg to read uploaded file before converting (preventing video names with special characters)&lt;br /&gt;
&lt;br /&gt;
log file of every conversion is created with a same name like converted video&lt;br /&gt;
Image from video is taken based on total video duration, php splits total video duration time by 2 and at that point picture is taken from video&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;Download&amp;nbsp;PHP + ffmpeg video converter&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;a href=&quot;http://www.mediafire.com/file/lcak2xanicp25fl/wdeveloper.blogspot.com_php-ffmpeg-video-converter.zip&quot;&gt;http://www.mediafire.com/file/lcak2xanicp25fl/wdeveloper.blogspot.com_php-ffmpeg-video-converter.zip&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wdeveloper.blogspot.com/feeds/2940329527407396694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/php-script-php-ffmpeg-video-converter.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/2940329527407396694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/2940329527407396694'/><link rel='alternate' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/php-script-php-ffmpeg-video-converter.html' title='[PHP Script] PHP + ffmpeg video converter'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-FaEaXiX7RCU/TaXrQUJpH-I/AAAAAAAAAjQ/SvT3B7IXPF8/s72-c/video_converter.jpg" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5766888573580627794.post-6808399350844975313</id><published>2011-04-13T11:19:00.000-07:00</published><updated>2011-04-13T11:19:39.037-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP Script"/><title type='text'>[PHP Script] CMS pro! - Lightweight Content Management System</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-jCyxuL2X6Bo/TaXowbsHI0I/AAAAAAAAAjM/BMd2_eRHR3M/s1600/cmspro.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;236&quot; src=&quot;http://3.bp.blogspot.com/-jCyxuL2X6Bo/TaXowbsHI0I/AAAAAAAAAjM/BMd2_eRHR3M/s400/cmspro.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&amp;nbsp;CMS pro! Version: 1.5.3 (last)&lt;br /&gt;
&lt;br /&gt;
Live Demo:&lt;br /&gt;
Admin area &lt;a href=&quot;http://wojoscripts.com/cmspro/admin/&quot;&gt;http://wojoscripts.com/cmspro/admin/&lt;/a&gt;&lt;br /&gt;
Demo &lt;a href=&quot;http://wojoscripts.com/cmspro/&quot;&gt;http://wojoscripts.com/cmspro/&lt;/a&gt;&lt;br /&gt;
Username: admin&lt;br /&gt;
Password: admin&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
&lt;b&gt;CMS Pro! i&lt;/b&gt;s the most intuitive CMS (Content Management System) that a web agency can implement for their customers. It’s perfect for small business websites and is really easy to use and to implement. &lt;br /&gt;
The value of CMS Pro! is in its intuitiveness. With CMS Pro!, content management becomes as easy as desktop publishing . &lt;br /&gt;
&lt;br /&gt;
The real value to the customer does not come from hundreds of features that she can’t or won’t ever use. Real value comes from making it really simple to use some great power features that get the job done. &lt;br /&gt;
&lt;br /&gt;
That’s exactly what CMS Pro! delivers. CMS Pro! allows small business owners manage their entire site, or change their web site design in seconds.&lt;br /&gt;
Some of the features include:&lt;br /&gt;
Modular design – Creating a module(side box) takes only few clicks&lt;br /&gt;
Dynamic layout – Easy drag and drop of modules(sidebars) for each individual page&lt;br /&gt;
Unique page layout – Each page can have up to 4 module positions top/bottom/left/right&lt;br /&gt;
Dynamic menu creation – add as many menu items as you like, unlimited menu levels, easy drag.&lt;br /&gt;
Multiple posts per page – you can add multiple posts per page.&lt;br /&gt;
Dedicated contact and home page.&lt;br /&gt;
7 professional modules included jQuery slider, News Slider, Event Manager, jQuery Tabs, Poll, Vertical Menu and Recent Twitts&lt;br /&gt;
Built in gallery module&lt;br /&gt;
Built in commenting system&lt;br /&gt;
Powerful file manager&lt;br /&gt;
Database backup/restore&lt;br /&gt;
SEO Optimized&lt;br /&gt;
User permissions&lt;br /&gt;
Built in Installation wizard&lt;br /&gt;
and many more…&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;Download&amp;nbsp;&amp;nbsp;CMS pro!&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;a href=&quot;http://www.mediafire.com/file/y6qirrtaybru6cd/wdeveloper.blopspot.com_cms-pro.rar&quot;&gt;http://www.mediafire.com/file/y6qirrtaybru6cd/wdeveloper.blopspot.com_cms-pro.rar&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wdeveloper.blogspot.com/feeds/6808399350844975313/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/php-script-cms-pro-lightweight-content.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/6808399350844975313'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/6808399350844975313'/><link rel='alternate' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/php-script-cms-pro-lightweight-content.html' title='[PHP Script] CMS pro! - Lightweight Content Management System'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-jCyxuL2X6Bo/TaXowbsHI0I/AAAAAAAAAjM/BMd2_eRHR3M/s72-c/cmspro.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5766888573580627794.post-646881262339370611</id><published>2011-04-13T11:12:00.000-07:00</published><updated>2011-04-13T11:12:49.656-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JQuery Plugin"/><title type='text'>[JQuery Plugin] Dab News Slider</title><content type='html'>&lt;b&gt;Dab News Slider&amp;nbsp;&lt;/b&gt;&amp;nbsp;is a mootools based slider which rotates the news in a very nice way.It is very customizable so you can theme it yourself as you want,can change the time for which a news will appear,the time in which the news change.You can use images,text,video etc. or say anything you want in your news.&lt;br /&gt;
Live demo: &lt;a href=&quot;http://codecanyon.net/item/dab-news-slider/full_screen_preview/132308&quot;&gt;http://codecanyon.net/item/dab-news-...preview/132308&lt;/a&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/--_8DrRgWdoQ/TaXnYDPvMzI/AAAAAAAAAjI/ifb9SAJ11Z4/s1600/dad-new-slider.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;324&quot; src=&quot;http://3.bp.blogspot.com/--_8DrRgWdoQ/TaXnYDPvMzI/AAAAAAAAAjI/ifb9SAJ11Z4/s640/dad-new-slider.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;http://codecanyon.net/item/dab-news-slider/full_screen_preview/132308&quot;&gt;&lt;/a&gt;Features&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;6 Themes&lt;/li&gt;
&lt;li&gt;Auto slide&lt;/li&gt;
&lt;li&gt;Adjustable width and height&lt;/li&gt;
&lt;li&gt;Limit number of news items to play&lt;/li&gt;
&lt;li&gt;Limit intro text characters&lt;/li&gt;
&lt;li&gt;News scroll function build in&lt;/li&gt;
&lt;li&gt;Fade , Scroll , Scroll-Fade transition choices&lt;/li&gt;
&lt;li&gt;Vertical , horizontal slides&lt;/li&gt;
&lt;li&gt;CSS and XHTML valid&lt;/li&gt;
&lt;li&gt;Cross browser compatible&lt;/li&gt;
&lt;li&gt;IE6 PNG fix build in&lt;/li&gt;
&lt;/ul&gt;&lt;b&gt;Download&amp;nbsp;Dab News Slider&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.mediafire.com/file/ryog4d9u4y1srfo/wdeveloper.blogspot.com_dabsilder.zip&quot;&gt;http://www.mediafire.com/file/ryog4d9u4y1srfo/wdeveloper.blogspot.com_dabsilder.zip&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wdeveloper.blogspot.com/feeds/646881262339370611/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/jquery-plugin-dab-news-slider.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/646881262339370611'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/646881262339370611'/><link rel='alternate' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/jquery-plugin-dab-news-slider.html' title='[JQuery Plugin] Dab News Slider'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/--_8DrRgWdoQ/TaXnYDPvMzI/AAAAAAAAAjI/ifb9SAJ11Z4/s72-c/dad-new-slider.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5766888573580627794.post-713812874502926718</id><published>2011-04-13T07:32:00.000-07:00</published><updated>2011-04-14T02:09:49.200-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JQuery Plugin"/><title type='text'>[JQuery Plugin] Two Tier Sliding Menu</title><content type='html'>&lt;b&gt;Two Tier Sliding Menu&lt;/b&gt; is a jQuery plugin that creates a two tier sliding menu out of an unordered list. It supports only two levels of nested HTML lists (in other words, one main list and one child list for each main item, the most). It allows to initially open the menu at a ceratin item and, optionally, have it close all the other opened items upon opening an item.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-WcQsXxmbPaQ/TaWzJ1pTYtI/AAAAAAAAAjE/RUTcF9XNL5g/s1600/jquery_two_tier_sliding_menu.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;324&quot; src=&quot;http://2.bp.blogspot.com/-WcQsXxmbPaQ/TaWzJ1pTYtI/AAAAAAAAAjE/RUTcF9XNL5g/s640/jquery_two_tier_sliding_menu.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;Download JQuery Two Tier Sliding Menu&amp;nbsp;Plugin&lt;/b&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;&lt;a href=&quot;http://www.mediafire.com/file/peqlb45i37w3pyb/wdeveloper.blogspot.com_jquery-two-tier-sliding-menu-plugin.zip&quot;&gt;http://www.mediafire.com/file/peqlb45i37w3pyb/wdeveloper.blogspot.com_jquery-two-tier-sliding-menu-plugin.zip&lt;/a&gt;&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://wdeveloper.blogspot.com/feeds/713812874502926718/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/jquery-plugin-two-tier-sliding-menu.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/713812874502926718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/713812874502926718'/><link rel='alternate' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/jquery-plugin-two-tier-sliding-menu.html' title='[JQuery Plugin] Two Tier Sliding Menu'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-WcQsXxmbPaQ/TaWzJ1pTYtI/AAAAAAAAAjE/RUTcF9XNL5g/s72-c/jquery_two_tier_sliding_menu.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5766888573580627794.post-4789459598228309203</id><published>2011-04-13T07:12:00.000-07:00</published><updated>2011-04-13T07:20:32.940-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP Script"/><title type='text'>[PHP Script] EZ POLL</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-A6xLh_EJHEc/TaWu29hpkKI/AAAAAAAAAjA/O1mIYqAqin8/s1600/EZ-POLL.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;324&quot; src=&quot;http://2.bp.blogspot.com/-A6xLh_EJHEc/TaWu29hpkKI/AAAAAAAAAjA/O1mIYqAqin8/s640/EZ-POLL.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Tahoma, Geneva, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;EZ POLL&lt;/b&gt;: A SIMPLE BUT POWERFUL AND CUSTOMIZABLE POLLING MANAGEMENT SYSTEM.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Cross-browser compatible&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Multi-option polls&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Time sensitive polls (start and end both optional)&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Javascript and non-javascript display options&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Custom color coded bars&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Limiting votes per day, per poll lifetime per user (IP based)&amp;nbsp;&lt;/li&gt;
&lt;li&gt;and more!&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
JS Enabled Demo: &lt;a href=&quot;http://dtimagery.com/ezpoll/ezpoll_demo_js.php&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://dtimagery.com/ezpoll/ezpoll_demo_js.php&quot;&gt;http://dtimagery.com/ezpoll/ezpoll_demo_js.php&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
JS Disabled Demo: &lt;a href=&quot;http://dtimagery.com/ezpoll/ezpoll_demo.php&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://dtimagery.com/ezpoll/ezpoll_demo.php&quot;&gt;http://dtimagery.com/ezpoll/ezpoll_demo.php&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Backend Demo: &lt;a href=&quot;http://dtimagery.com/ezpoll/ezpoll/&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://dtimagery.com/ezpoll/ezpoll&quot;&gt;http://dtimagery.com/ezpoll/ezpoll&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Username: admin Password: admin&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;Download&amp;nbsp;EZ POLL&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;a href=&quot;http://www.mediafire.com/file/8ue9plkc9ocx99t/wdeveloper.blogspot.com_ez-poll-source.zip&quot;&gt;http://www.mediafire.com/file/8ue9plkc9ocx99t/wdeveloper.blogspot.com_ez-poll-source.zip&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wdeveloper.blogspot.com/feeds/4789459598228309203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/script-ez-poll.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/4789459598228309203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/4789459598228309203'/><link rel='alternate' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/script-ez-poll.html' title='[PHP Script] EZ POLL'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-A6xLh_EJHEc/TaWu29hpkKI/AAAAAAAAAjA/O1mIYqAqin8/s72-c/EZ-POLL.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5766888573580627794.post-1730108350953454632</id><published>2011-04-13T06:56:00.000-07:00</published><updated>2011-04-13T07:20:14.991-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ajax"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP Script"/><title type='text'>[Ajax] AJAX AutoSuggest</title><content type='html'>&lt;b&gt;AJAX AutoSuggest&lt;/b&gt;&amp;nbsp;helps web developers in making web sites more usable and user friendly.&lt;br /&gt;
With the help of this plugin a search text box within a web page could be easily converted into an smart suggestion box that would list out all related search entries. User can choose from suggestion list using keyboard or mouse.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-TxkgHllF8ss/TaWrbbzlBLI/AAAAAAAAAi8/Q32AybtvmnY/s1600/AJAX-AutoSuggest.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;202&quot; src=&quot;http://1.bp.blogspot.com/-TxkgHllF8ss/TaWrbbzlBLI/AAAAAAAAAi8/Q32AybtvmnY/s400/AJAX-AutoSuggest.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
AJAX AutoSuggest is built using&lt;br /&gt;
PHP 5&lt;br /&gt;
MySQL 5&lt;br /&gt;
Javascript&lt;br /&gt;
The plugin offers variety of features that could help the web developers in enhancing their websites.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
Features&lt;br /&gt;
Full support to keyboard&lt;br /&gt;
Full support to mouse&lt;br /&gt;
Customizable colors to match your web site theme&lt;br /&gt;
Auto adjusting width to precisely match the search text box&lt;br /&gt;
Extremely simple configuration&lt;br /&gt;
Compatible to all major browsers&lt;br /&gt;
&lt;br /&gt;
Live Demo: &lt;a href=&quot;http://www.capjo.com/envato/codecanyon/aas/&quot;&gt;http://www.capjo.com/envato/codecanyon/aas&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Download AJAX AutoSuggest&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;a href=&quot;http://www.mediafire.com/file/ukzifo6rf8ao6q1/wdeveloper.blogspot.com_ajax-autosuggest.rar&quot;&gt;http://www.mediafire.com/file/ukzifo6rf8ao6q1/wdeveloper.blogspot.com_ajax-autosuggest.rar&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wdeveloper.blogspot.com/feeds/1730108350953454632/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/script-ajax-autosuggest.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/1730108350953454632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/1730108350953454632'/><link rel='alternate' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/script-ajax-autosuggest.html' title='[Ajax] AJAX AutoSuggest'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-TxkgHllF8ss/TaWrbbzlBLI/AAAAAAAAAi8/Q32AybtvmnY/s72-c/AJAX-AutoSuggest.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5766888573580627794.post-1579121198366651509</id><published>2011-04-13T06:47:00.000-07:00</published><updated>2011-04-13T07:19:55.730-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP Script"/><title type='text'>[PHP Script] Wallpaper script</title><content type='html'>&lt;b&gt;Wallpaper script&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Script Info:&lt;br /&gt;
Wallpaper Script is a complete image gallery solution that lets you collect, organize and&lt;br /&gt;
share your wallpapers with friends and family. You can upload and access your images at any time&lt;br /&gt;
from any computer with an Internet connection. Wallpaper Script sets the bar when it comes to &lt;br /&gt;
wallpaper gallery software, and no other competitor offers as many features as you&#39;ll find in Wallpaper Script.&lt;br /&gt;
Wallpaper Script is the premium wallpaper gallery solution used by hundreds of people just like you to share &lt;br /&gt;
and show off their images to the world. Features include bulk wallpaper uploading, comments, tags, &lt;br /&gt;
powerful search, multiple user accounts, unlimited photos, unlimited galleries, automatic thumbnail creation, &lt;br /&gt;
sorting, gallery statistics and user registration.&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;div&gt;Live Demo:&amp;nbsp;&lt;a href=&quot;http://wallpaperscript.com/demo/&quot;&gt;http://wallpaperscript.com/demo&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Download &lt;b&gt;Wallpaper script&lt;/b&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;http://www.mediafire.com/file/k8v8ze1y292n4vx/wdeveloper.blogspot.com_Wallpaper_Script.rar&quot;&gt;http://www.mediafire.com/file/k8v8ze1y292n4vx/wdeveloper.blogspot.com_Wallpaper_Script.rar&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wdeveloper.blogspot.com/feeds/1579121198366651509/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/script-wallpaper-script.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/1579121198366651509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/1579121198366651509'/><link rel='alternate' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/script-wallpaper-script.html' title='[PHP Script] Wallpaper script'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5766888573580627794.post-3560642899680570723</id><published>2011-04-13T06:34:00.000-07:00</published><updated>2011-04-13T07:19:36.999-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP Script"/><title type='text'>[PHP Script] Canny Comment System</title><content type='html'>&lt;b&gt;Canny Comment System&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-eIbyhM05BuU/TaWmQ83nLqI/AAAAAAAAAi4/ivfJE2BNXvk/s1600/canny-comment.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;163&quot; src=&quot;http://4.bp.blogspot.com/-eIbyhM05BuU/TaWmQ83nLqI/AAAAAAAAAi4/ivfJE2BNXvk/s400/canny-comment.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;Features:&lt;br /&gt;
&lt;br /&gt;
Ajax-Powered – Snappy jQuery-driven&lt;br /&gt;
100% CSS UI – No images!&lt;br /&gt;
Intuitive Admin Panel – Manage comments your way, no config file hassles&lt;br /&gt;
Comment ratings – Let users rate each comment (IP Address Restriction)&lt;br /&gt;
Admin approval&lt;br /&gt;
- Approve comments before making them live&lt;br /&gt;
- Receive emails of pending comments&lt;br /&gt;
Client and server side validation – Ajax and PHP front-end validation&lt;br /&gt;
Global Avatars – Gravatar.com&lt;br /&gt;
Fully sanitized data – Safe from MySQL attacks&lt;br /&gt;
Spam Protection&lt;br /&gt;
Bad word filtering&lt;br /&gt;
Parses links automatically&lt;br /&gt;
Refined jQuery animations – Impress your audience&lt;br /&gt;
Inline-labels for comment forms – user-friendliness always wins&lt;br /&gt;
Admin approve, deny, delete buttons&lt;br /&gt;
Sort comments ascending or descending&lt;br /&gt;
New – Multi-page support&lt;br /&gt;
Excellent for any site without comments, CMS sites, blogs. Even let Canny Comment take over your current commenting.&lt;br /&gt;
&lt;br /&gt;
Live Demo: &lt;a href=&quot;http://www.illustratut.com/canny_comment_demo&quot;&gt;http://www.illustratut.com/canny_comment_demo&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp;Download&amp;nbsp;&lt;b&gt;Canny Comment System&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.mediafire.com/file/1ihsmzhs1re0e67/wdeveloper.blogspot.com_CannyCommentSystem.rar&quot;&gt;http://www.mediafire.com/file/1ihsmzhs1re0e67/wdeveloper.blogspot.com_CannyCommentSystem.rar&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wdeveloper.blogspot.com/feeds/3560642899680570723/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/script-canny-comment-system.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/3560642899680570723'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/3560642899680570723'/><link rel='alternate' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/script-canny-comment-system.html' title='[PHP Script] Canny Comment System'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-eIbyhM05BuU/TaWmQ83nLqI/AAAAAAAAAi4/ivfJE2BNXvk/s72-c/canny-comment.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5766888573580627794.post-2393299343575920673</id><published>2011-04-13T06:29:00.000-07:00</published><updated>2011-04-14T02:10:46.188-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JQuery Plugin"/><title type='text'>[JQuery Plugin] SexySlider 1.4</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Tahoma, Geneva, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;SexySlider&lt;/b&gt; is a JQuery plugin that lets you easily create powerful javascript Sliders with very nice transition effects. Enhance your website by adding a unique and attractive slider!&lt;br /&gt;
&lt;br /&gt;
Visit the &lt;a href=&quot;http://codecanyon.net/item/sexy-slider/full_screen_preview/87148&quot;&gt;Live Preview&lt;/a&gt; to see the effects.&lt;br /&gt;
&lt;br /&gt;
Demo:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-1XoyrQr7PX8/TaWkjk5zbHI/AAAAAAAAAi0/u-tiJ1Oj6Kc/s1600/SexySlider+1.4.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;202&quot; src=&quot;http://1.bp.blogspot.com/-1XoyrQr7PX8/TaWkjk5zbHI/AAAAAAAAAi0/u-tiJ1Oj6Kc/s400/SexySlider+1.4.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;Download&amp;nbsp;SexySlider 1.4&lt;/b&gt;&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;http://www.mediafire.com/file/a2l249xilso07oh/wdeveloper.blogspot.com_sexy-slider-source.zip&quot;&gt;http://www.mediafire.com/file/a2l249xilso07oh/wdeveloper.blogspot.com_sexy-slider-source.zip&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wdeveloper.blogspot.com/feeds/2393299343575920673/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/jquery-sexyslider-14.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/2393299343575920673'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/2393299343575920673'/><link rel='alternate' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/jquery-sexyslider-14.html' title='[JQuery Plugin] SexySlider 1.4'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-1XoyrQr7PX8/TaWkjk5zbHI/AAAAAAAAAi0/u-tiJ1Oj6Kc/s72-c/SexySlider+1.4.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5766888573580627794.post-7898722416847512981</id><published>2011-04-13T05:43:00.000-07:00</published><updated>2011-04-14T02:11:44.706-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP Script"/><title type='text'>[PHP Script] QuickShop</title><content type='html'>&lt;b&gt;QuickShop&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;Simple and easy engine online store, very useful for smaller sales. There is a control panel, system templates (Smarty), the logic is separated from the presentation. Manage categories, products, orders, etc. Open your own online shop with QuickShop&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;Demo:&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-_pPvxd-dHXw/TaWaOU2GkXI/AAAAAAAAAiw/nMPEp4WTBvQ/s1600/quickshop.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;323&quot; src=&quot;http://4.bp.blogspot.com/-_pPvxd-dHXw/TaWaOU2GkXI/AAAAAAAAAiw/nMPEp4WTBvQ/s640/quickshop.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 14px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;b&gt;Download&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;b&gt;QuickShop&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 14px;&quot;&gt;&lt;a href=&quot;http://www.mediafire.com/file/8w4i4l1x3iiubkd/wdeveloper.blogspot.com_quickshop-source.zip&quot;&gt;http://www.mediafire.com/file/8w4i4l1x3iiubkd/wdeveloper.blogspot.com_quickshop-source.zip&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://wdeveloper.blogspot.com/feeds/7898722416847512981/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/script-quickshop.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/7898722416847512981'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/7898722416847512981'/><link rel='alternate' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/script-quickshop.html' title='[PHP Script] QuickShop'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-_pPvxd-dHXw/TaWaOU2GkXI/AAAAAAAAAiw/nMPEp4WTBvQ/s72-c/quickshop.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5766888573580627794.post-1399307421309131651</id><published>2011-04-13T05:36:00.000-07:00</published><updated>2011-04-13T07:18:44.045-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP Script"/><title type='text'>[PHP Script] CSS3 Mega Drop Down Menu</title><content type='html'>&lt;b&gt;CSS3 Mega Drop Down Menu&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Bộ menu giống với game.zing.vn cho các bạn tham khảo.&lt;br /&gt;
&lt;br /&gt;
This Mega Drop Down Menu is now more flexible and can contain even more content using the new Full Width feature.&lt;br /&gt;
&lt;br /&gt;
This Mega Drop Down Menu is perfect for creating unique menus easily. It’s CSS / XHTML only, there is absolutely NO javascript.&lt;br /&gt;
&lt;br /&gt;
The content can be organized in 1, 2, 3, 4 or 5 columns based on the 960 grid system.&lt;br /&gt;
This item comes with 9 color variants and a detailed documentation to help you start with your brand new menu.&lt;br /&gt;
&lt;br /&gt;
CSS classes allow you to create lists, paragraphs with (or without) images, make your menu stick to the left or the right side, and create your own color schemes quickly.&lt;br /&gt;
&lt;br /&gt;
Demo:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-Tq_PjvtAYUs/TaWYyQlUU1I/AAAAAAAAAis/wePVaRNFvSI/s1600/css3-mega-drop.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;202&quot; src=&quot;http://1.bp.blogspot.com/-Tq_PjvtAYUs/TaWYyQlUU1I/AAAAAAAAAis/wePVaRNFvSI/s400/css3-mega-drop.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;b&gt;Download&amp;nbsp;&lt;/b&gt;&lt;/span&gt;CSS3 Mega Drop Down Menu&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;a href=&quot;http://www.mediafire.com/file/533132e7247b5ov/wdeveloper.blogspot.com_css3-mega-drop-down-menu.zip&quot;&gt;http://www.mediafire.com/file/533132e7247b5ov/wdeveloper.blogspot.com_css3-mega-drop-down-menu.zip&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wdeveloper.blogspot.com/feeds/1399307421309131651/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/script-css3-mega-drop-down-menu.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/1399307421309131651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/1399307421309131651'/><link rel='alternate' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/script-css3-mega-drop-down-menu.html' title='[PHP Script] CSS3 Mega Drop Down Menu'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-Tq_PjvtAYUs/TaWYyQlUU1I/AAAAAAAAAis/wePVaRNFvSI/s72-c/css3-mega-drop.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5766888573580627794.post-5696987140949797724</id><published>2011-04-13T05:29:00.000-07:00</published><updated>2011-04-13T07:18:28.765-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP Script"/><title type='text'>[PHP Script] PHP Event Calendar</title><content type='html'>&lt;b&gt;PHP Event Calendar&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
PHP Event Calendar is a MySQL Database driven script that displays events on your website quickly and easily through a traditional calendar UI. It can be integrated into any existing PHP page within minutes using a simple file include.&lt;br /&gt;
It features a simple yet advanced Administration Panel with secure login sessions, from within this you have full control over your calendar events and gives the ability to Add Events, Search &amp;amp; Edit Events, Delete Events from your calendar and so forth.&lt;br /&gt;
View our Live Demo!&lt;br /&gt;
Main Features&lt;br /&gt;
Several theme colours included! (Grey, Green, Red and Blue)&lt;br /&gt;
Cross-Browser Compatible (IE6+, FF, Safari)&lt;br /&gt;
Simple MySQL Database Backend&lt;br /&gt;
Calendar uses 1 CSS Style&lt;br /&gt;
jQuery Lightbox for Day Event&lt;br /&gt;
Integrated Secure Login Script&lt;br /&gt;
Admin Control Panel&lt;br /&gt;
Add Events in seconds&lt;br /&gt;
Displays upcoming events&lt;br /&gt;
Search Events feature&lt;br /&gt;
Edit Previous Events Easily&lt;br /&gt;
Delete a previous event&lt;br /&gt;
Online Documentation&lt;br /&gt;
You can view the installation guide and FAQ ’s by following this link:&lt;a href=&quot;http://www.jigowatt.co.uk/themeforest/calendar/&quot;&gt;http://www.jigowatt.co.uk/themeforest/calendar/&lt;/a&gt;&lt;br /&gt;
Live Demo&lt;br /&gt;
You can view a demo of both the main installation and admin panel by following this link:&lt;a href=&quot;http://www.jigowatt.co.uk/themeforest/calendar/&quot;&gt;http://www.jigowatt.co.uk/themeforest/calendar/&lt;/a&gt;&lt;br /&gt;
Server Requirements&lt;br /&gt;
Supports PHP 4 .x or later&lt;br /&gt;
Supports MySQL 4.x or later (Requires 1 Database)&lt;br /&gt;
Can be tweaked or modified once purchased if you know the PHP language.&lt;br /&gt;
Support&lt;br /&gt;
Please contact with any questions you may have, full online documentation and support FAQ ’s included with the file for simple integration in your existing website or as a stand-alone product.&lt;br /&gt;
&lt;br /&gt;
Demo:&lt;br /&gt;
&lt;div class=&quot;content&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div id=&quot;post_message_8340&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-g3PouQzyFnM/TaWW79imqwI/AAAAAAAAAio/rW4bmt9vs68/s1600/PHP_Event_Calendar_Preview.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;202&quot; src=&quot;http://2.bp.blogspot.com/-g3PouQzyFnM/TaWW79imqwI/AAAAAAAAAio/rW4bmt9vs68/s400/PHP_Event_Calendar_Preview.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;b&gt;Download PHP Event Calendar&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://www.mediafire.com/file/7c57v7ck45980gt/wdeveloper.blogspot.com_php_Event_Calendar_1_5.zip&quot;&gt;http://www.mediafire.com/file/7c57v7ck45980gt/wdeveloper.blogspot.com_php_Event_Calendar_1_5.zip&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wdeveloper.blogspot.com/feeds/5696987140949797724/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/script-php-event-calendar.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/5696987140949797724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/5696987140949797724'/><link rel='alternate' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/script-php-event-calendar.html' title='[PHP Script] PHP Event Calendar'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-g3PouQzyFnM/TaWW79imqwI/AAAAAAAAAio/rW4bmt9vs68/s72-c/PHP_Event_Calendar_Preview.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5766888573580627794.post-1700072634077324177</id><published>2011-04-13T05:22:00.000-07:00</published><updated>2011-04-13T07:18:13.735-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP Script"/><title type='text'>[PHP Script] User - Member Manager</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;b&gt;User - Member Manager&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;User Manager provides a simple method of integrating a member system into a new or existing site. The script features a CMS / admin panel to manage users &amp;amp; site settings as well as a collection of scripts that show you how to add login, registration, logout, password recovery and user access restrictions to your existing site.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;If you want to play around with User Manager then I suggest you check out the live demos below.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;Features / What you get&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;Users can login using their Facebook account&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;Easy to extend and manipulate data stored in the CMS using built-in API&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;Users can edit their profiles&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;Users have profile pages&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;Robust password recovery for users&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;Intuitive install process for CMS&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;Full database &amp;amp; file backup&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;Easily manage which groups of users (Members, Administrators) can access which areas of your site&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;Simple and intuitive examples to help you make changes to better suit your specific needs&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;Straightforward API for more advanced users&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;Demonstration&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;For this particular script I’ve decided to include just one example, which includes all the functionality you would expect to see in a user management system including login, forgot password, logout, register and access restrictions based on a user’s access level. I could talk about the user manager all day but as they say, the proof is in the pudding; so why not take a look at the demo links below: The admin email and password is&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;a href=&quot;mailto:admin@mattlowden.com&quot; style=&quot;color: #417394; text-decoration: none;&quot;&gt;admin@mattlowden.com&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;/ adminadmin.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;Admin panel&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;Register for account&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;Login&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;Forgot password&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;Log out&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;Edit profile&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;Member list&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;Who is this script for?&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;User Manager is ideal for anyone wanting to give users the opportunity to register with their site. Using the examples you can either build a new site around the User Manager or integrate it with an existing site.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;Installation&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;User Manager is built with Mokoala CMS, the Mokoala installation guide covers how to install this script.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;Facebook Integration&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;In order to enable Facebook logins you will need a Facebook API key.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;Documentation&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;All of the guides that you need are located in the Mokoala guides section.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 14px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;Demo:&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: small;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-4_9f9v7WKIE/TaWViamN-BI/AAAAAAAAAik/AfLcSc6aFFY/s1600/user-manager.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;202&quot; src=&quot;http://1.bp.blogspot.com/-4_9f9v7WKIE/TaWViamN-BI/AAAAAAAAAik/AfLcSc6aFFY/s400/user-manager.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;Download User - Member Manager&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 14px;&quot;&gt;&lt;a href=&quot;http://www.mediafire.com/file/phe4fb6bxm2kwxo/wdeveloper.blogspot.com-user-member-manager.zip&quot;&gt;http://www.mediafire.com/file/phe4fb6bxm2kwxo/wdeveloper.blogspot.com-user-member-manager.zip&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://wdeveloper.blogspot.com/feeds/1700072634077324177/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/script-user-member-manager.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/1700072634077324177'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5766888573580627794/posts/default/1700072634077324177'/><link rel='alternate' type='text/html' href='http://wdeveloper.blogspot.com/2011/04/script-user-member-manager.html' title='[PHP Script] User - Member Manager'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-4_9f9v7WKIE/TaWViamN-BI/AAAAAAAAAik/AfLcSc6aFFY/s72-c/user-manager.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>