<?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-6179249185834200605</id><updated>2024-11-01T03:51:49.893-07:00</updated><category term="PHP"/><category term="HTML"/><category term="CSS"/><category term="JAVASCRIPT"/><category term="JQUERY"/><category term="XML"/><title type='text'>Learn Programming</title><subtitle type='html'>This is the easiest place when you can learn programmation languages and become a good programmer</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://prog-teach.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://prog-teach.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Yahya prog</name><uri>http://www.blogger.com/profile/01103381213725850855</uri><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>20</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6179249185834200605.post-291244868700434526</id><published>2012-04-01T04:27:00.000-07:00</published><updated>2012-04-01T04:27:27.160-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Cookies In PHP</title><content type='html'>&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3v7pOUIJq2SK1qoXSqX0SsfPXtJLwB8cVLavehc0ppVlAIPcjzsDr-2i7ubYwv1Tm-HV2oggSp6Vzvc1HrGohShK8AUa9mS-8RV_m6DLMbKKOPuXNCTQPLk5zrpHONbd9F1c3r8S5z_0/s1600/php-icone-6255-96.png&quot; /&gt;&lt;/div&gt;
&lt;br /&gt;
A cookie is a small text file in which a website can store different information. Cookies are saved on the user&#39;s hard drive and not on the server.&lt;br /&gt;
Most cookies expire (delete themselves) after a predetermined time period, which can range from one minute to several years. But the user can also identify and delete any cookies on his/her computer.&lt;br /&gt;
Most browsers, such as Microsoft Internet Explorer, Mozilla Firefox and Google Chrome, can be configured to let the user choose whether or not he/she will accept a cookie. But then, why not just say no to all cookies? It is possible. But many websites would not work as intended without cookies, since cookies in many contexts are used to improve the usability and functionality of the website.&lt;br /&gt;
&lt;h2&gt;
How is information stored in a cookie?&lt;/h2&gt;
It&#39;s easy to set or modify a cookie in PHP with setcookie. In the first example, we will create a cookie and set the value.&lt;br /&gt;
First, you need a name for the cookie. In this example we will use the name &quot;HTMLTest&quot;. Next, you set the value of the cookie like this:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot; style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; text-align: left;&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; color: #666666; font-family: verdana, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em; text-align: -webkit-auto;&quot;&gt;
&lt;pre style=&quot;color: black; line-height: normal;&quot;&gt; &lt;span class=&quot;code-php&quot;&gt;&amp;lt;?php&lt;/span&gt; 

 &lt;span class=&quot;code-comments&quot;&gt;// Setting the cookie&lt;/span&gt;
 &lt;span class=&quot;code-php&quot;&gt;setcookie(&quot;HTMLTest&quot;, &quot;This is a test cookie&quot;);&lt;/span&gt;   

 &lt;span class=&quot;code-php&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;pre&gt; &lt;/pre&gt;
&lt;/div&gt;
By default, a cookie is kept untill the browser is closed, but it can easily be modified by adding another parameter setting the expiry time:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot; style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; text-align: left;&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; color: #666666; font-family: verdana, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em; text-align: -webkit-auto;&quot;&gt;
&lt;pre style=&quot;color: black; line-height: normal;&quot;&gt; &lt;span class=&quot;code-php&quot;&gt;&amp;lt;?php&lt;/span&gt; 

 &lt;span class=&quot;code-comments&quot;&gt;// Setting the cookie&lt;/span&gt;
 &lt;span class=&quot;code-php&quot;&gt;setcookie(&quot;Name&quot;, &quot;C. Wing, time()+3600);&lt;/span&gt;   
 &lt;span class=&quot;code-php&quot;&gt;setcookie(&quot;Interests&quot;, &quot;plane spotting&quot;, time()+3600);&lt;/span&gt; 
 
 &lt;span class=&quot;code-php&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&quot;Time()+3600&quot; specified that the cookie should expire in 3600 seconds (60 minutes) from now.&lt;br /&gt;
In the example above, we stored information about a user&#39;s name and interests. This information can, for example, be useful to target the website specifically for the individual visitor.&lt;br /&gt;
&lt;h2&gt;
How do you retrieve the value of a cookie?&lt;/h2&gt;
To get the value of the cookie, $_COOKIE is used. For example, if we need the information from the example above, we do it like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot; style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; text-align: left;&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; color: #666666; font-family: verdana, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em; text-align: -webkit-auto;&quot;&gt;
&lt;pre style=&quot;color: black; line-height: normal;&quot;&gt; &lt;span class=&quot;code-php&quot;&gt;&amp;lt;?php&lt;/span&gt; 

 &lt;span class=&quot;code-comments&quot;&gt;// Retrieve values from the cookie&lt;/span&gt;
 &lt;span class=&quot;code-php&quot;&gt;$strName = $_COOKIE[&quot;Name&quot;];&lt;/span&gt;   
 &lt;span class=&quot;code-php&quot;&gt;$strInterest = $_COOKIE[&quot;Interest&quot;];&lt;/span&gt;
  
 &lt;span class=&quot;code-comments&quot;&gt;// Write to the client&lt;/span&gt;
 &lt;span class=&quot;code-php&quot;&gt;echo &quot;&amp;lt;p&amp;gt;&quot; . strName . &quot;&amp;lt;/p&amp;gt;&quot;&lt;/span&gt;   
 &lt;span class=&quot;code-php&quot;&gt;echo &quot;&amp;lt;p&amp;gt;Your interest is . &quot; strInterest . &quot;&amp;lt;/p&amp;gt;&quot;&lt;/span&gt;
 
 &lt;span class=&quot;code-php&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;h2&gt;
Who can read the cookie?&lt;/h2&gt;
By default, a cookie can be read at the same second-level domain (e.g.&amp;nbsp;
prog-teach.blogspot.com&amp;nbsp;) as it was created. But by using the parameters &lt;em&gt;domain&lt;/em&gt; and &lt;em&gt;path&lt;/em&gt;, you can put further restrictions on the cookie using the following syntax:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot; style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; text-align: left;&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; color: #666666; font-family: verdana, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em; text-align: -webkit-auto;&quot;&gt;
&lt;pre style=&quot;color: black; line-height: normal;&quot;&gt;setcookie&lt;em&gt;(name, value, expiration time, path, domain);&lt;/em&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;pre&gt; &lt;/pre&gt;
&lt;/div&gt;
Let us look at an example:&lt;br /&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;pre&gt; 
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;; white-space: normal;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot; style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; text-align: left;&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; color: #666666; font-family: verdana, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em; text-align: -webkit-auto;&quot;&gt;

&lt;pre style=&quot;color: black; line-height: normal;&quot;&gt; &lt;span class=&quot;code-php&quot;&gt;&amp;lt;?php&lt;/span&gt;
 
 &lt;span class=&quot;code-comments&quot;&gt;// Setting the cookie: name, value, expiration time, path, domain&lt;/span&gt;
 &lt;span class=&quot;code-php&quot;&gt;setcookie(&quot;Name&quot;, &quot;C. Wing&quot;, time()+60*60*24*365, &quot;/tutorials/php/&quot;, &quot;www.prog-teach.blogspot.com&quot;);&lt;/span&gt;   
 &lt;span class=&quot;code-php&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;/div&gt;
In the example above, we set a cookie called &quot;Name&quot; with the value &quot;C. Wing.&quot; The cookie expires after one year (60 seconds * 60 minutes * 24 hours * 365 days) and can be read only by sites located in the directory &quot;/tutorials/php/&quot; on the (sub-)domain .&lt;br /&gt;
&lt;h2&gt;
Example of a cookie&lt;/h2&gt;
We can try to save a sample cookie on your computer and then see how it looks.&lt;br /&gt;
The following code sets the cookie:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot; style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; text-align: left;&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; color: #666666; font-family: verdana, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em; text-align: -webkit-auto;&quot;&gt;
&lt;pre style=&quot;color: black; line-height: normal;&quot;&gt; &lt;span class=&quot;code-php&quot;&gt;&amp;lt;?php&lt;/span&gt; 

 &lt;span class=&quot;code-comments&quot;&gt;// Setting the cookie&lt;/span&gt;
 &lt;span class=&quot;code-php&quot;&gt;setcookie(&quot;HTMLTest&quot;, &quot;This text is in a cookie!&quot;, time()+60*60*24, &quot;/tutorials/php/&quot;, &quot;www.html.net&quot;);&lt;/span&gt;   
  
 &lt;span class=&quot;code-comments&quot;&gt;// Write the information to the client&lt;/span&gt;
 &lt;span class=&quot;code-php&quot;&gt;echo $_COOKIE [&quot;HTMLTest&quot;];&lt;/span&gt;    

 &lt;span class=&quot;code-php&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;pre&gt; &lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prog-teach.blogspot.com/feeds/291244868700434526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prog-teach.blogspot.com/2012/04/cookies-in-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/291244868700434526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/291244868700434526'/><link rel='alternate' type='text/html' href='http://prog-teach.blogspot.com/2012/04/cookies-in-php.html' title='Cookies In PHP'/><author><name>Yahya prog</name><uri>http://www.blogger.com/profile/01103381213725850855</uri><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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3v7pOUIJq2SK1qoXSqX0SsfPXtJLwB8cVLavehc0ppVlAIPcjzsDr-2i7ubYwv1Tm-HV2oggSp6Vzvc1HrGohShK8AUa9mS-8RV_m6DLMbKKOPuXNCTQPLk5zrpHONbd9F1c3r8S5z_0/s72-c/php-icone-6255-96.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6179249185834200605.post-7253986955512084560</id><published>2012-04-01T04:20:00.001-07:00</published><updated>2012-04-01T04:20:26.901-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Arrays In PHP</title><content type='html'>&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3v7pOUIJq2SK1qoXSqX0SsfPXtJLwB8cVLavehc0ppVlAIPcjzsDr-2i7ubYwv1Tm-HV2oggSp6Vzvc1HrGohShK8AUa9mS-8RV_m6DLMbKKOPuXNCTQPLk5zrpHONbd9F1c3r8S5z_0/s1600/php-icone-6255-96.png&quot; /&gt;&lt;/div&gt;
&lt;br /&gt;
An array is a set of indexed elements where each has its own, unique identification number.&lt;br /&gt;
Sound confusing? It&#39;s actually not that complicated.&lt;br /&gt;
Imagine a list of words separated by commas. It is called a comma-separated list, and it could, for example, look like this:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot; style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; text-align: left;&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; color: #666666; font-family: verdana, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em; text-align: -webkit-auto;&quot;&gt;
&lt;pre style=&quot;color: black; line-height: normal;&quot;&gt;apples, pears, bananas, oranges, lemons&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;pre&gt; &lt;/pre&gt;
&lt;/div&gt;
Then try to imagine dividing the list at each comma. Next, give each section a unique identification number .&lt;br /&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
What you see is an array. We can, for example, name the array &quot;fruits&quot;. The idea is that we can access the array with a number and get a value back, like this:&lt;br /&gt;
fruits(0) = apples&lt;br /&gt; fruits(1) = pears &lt;br /&gt; fruits(2) = bananas &lt;br /&gt; fruits(3) = oranges &lt;br /&gt; fruits(4) = lemons&lt;br /&gt;
This is the idea behind arrays. Let us try to use it in practice.&lt;br /&gt;
&lt;h2&gt;
How do you use an array?&lt;/h2&gt;
We will continue with the fruit example. Step by step, we will make it work as a real array. First, we set a variable equal to the list of fruits:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot; style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; text-align: left;&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; color: #666666; font-family: verdana, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em; text-align: -webkit-auto;&quot;&gt;
&lt;pre style=&quot;color: black; line-height: normal;&quot;&gt; &lt;span class=&quot;code-php&quot;&gt;&amp;lt;?php&lt;/span&gt;

 &lt;span class=&quot;code-php&quot;&gt;$fruitlist = &quot;apples, pears, bananas, oranges, lemons&quot;;&lt;/span&gt;
 
 &lt;span class=&quot;code-php&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;pre&gt; 
 &lt;/pre&gt;
&lt;/div&gt;
Next, we use the function explode to split the list at each comma:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot; style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; text-align: left;&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; color: #666666; font-family: verdana, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em; text-align: -webkit-auto;&quot;&gt;
&lt;pre style=&quot;color: black; line-height: normal;&quot;&gt; &lt;span class=&quot;code-php&quot;&gt;&amp;lt;?php&lt;/span&gt;
  
 &lt;span class=&quot;code-php&quot;&gt;$fruitlist = &quot;apples, pears, bananas, oranges, lemons&quot;;&lt;/span&gt;
  
 &lt;span class=&quot;code-php&quot;&gt;$arrFruits = explode(&quot;,&quot;, $fruitlist);&lt;/span&gt;

 &lt;span class=&quot;code-php&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;pre&gt; 
 &lt;/pre&gt;
&lt;/div&gt;
Voila! &quot;$arrFruits&quot; is now an array!&lt;br /&gt;
Notice that we called the function explode with two arguments:&lt;br /&gt;
 &lt;ol&gt;
&lt;li&gt;the list that should be split&lt;/li&gt;
&lt;li&gt;and the delimiter - i.e., the character used to split (in this case a comma) - in quotation marks: &quot;,&quot;.&lt;/li&gt;
&lt;/ol&gt;
Here we use a comma as a delimiter, but you can use any character or word as a delimiter.&lt;br /&gt;
Let us try to comment the script and put it into a PHP page:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot; style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; text-align: left;&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; color: #666666; font-family: verdana, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em; text-align: -webkit-auto;&quot;&gt;
&lt;pre style=&quot;color: black; line-height: normal;&quot;&gt; &amp;lt;html&amp;gt;
 &amp;lt;head&amp;gt;
 &amp;lt;title&amp;gt;Array&amp;lt;/title&amp;gt;
 &amp;lt;/head&amp;gt;
 &amp;lt;body&amp;gt;

 &lt;span class=&quot;code-php&quot;&gt;&amp;lt;?php&lt;/span&gt;
 
 &lt;span class=&quot;code-comments&quot;&gt;// Comma separated list&lt;/span&gt;
 &lt;span class=&quot;code-php&quot;&gt;$fruitlist = &quot;apples, pears, bananas, oranges, lemons&quot;;&lt;/span&gt;
  
 &lt;span class=&quot;code-comments&quot;&gt;// Create an array by splitting the list (with comma as delimiter)&lt;/span&gt;
 &lt;span class=&quot;code-php&quot;&gt;$arrFruits = explode(&quot;,&quot;, $fruitlist);&lt;/span&gt;
  
 &lt;span class=&quot;code-comments&quot;&gt;   // Write the values from our array&lt;/span&gt;
 &lt;span class=&quot;code-php&quot;&gt;   echo &quot;&amp;lt;p&amp;gt;The list of fruits:&amp;lt;/p&amp;gt;&quot;;&lt;/span&gt;
  
 &lt;span class=&quot;code-php&quot;&gt;   echo &quot;&amp;lt;ul&amp;gt;&quot;;&lt;/span&gt;
 &lt;span class=&quot;code-php&quot;&gt;   echo &quot;&amp;lt;li&amp;gt;&quot; . $arrFruits[0] . &quot;&amp;lt;/li&amp;gt;&quot;;&lt;/span&gt;
 &lt;span class=&quot;code-php&quot;&gt;   echo &quot;&amp;lt;li&amp;gt;&quot; . $arrFruits[1] . &quot;&amp;lt;/li&amp;gt;&quot;;&lt;/span&gt;
 &lt;span class=&quot;code-php&quot;&gt;   echo &quot;&amp;lt;li&amp;gt;&quot; . $arrFruits[2] . &quot;&amp;lt;/li&amp;gt;&quot;;&lt;/span&gt;
 &lt;span class=&quot;code-php&quot;&gt;   echo &quot;&amp;lt;li&amp;gt;&quot; . $arrFruits[3] . &quot;&amp;lt;/li&amp;gt;&quot;;&lt;/span&gt;
 &lt;span class=&quot;code-php&quot;&gt;   echo &quot;&amp;lt;li&amp;gt;&quot; . $arrFruits[4] . &quot;&amp;lt;/li&amp;gt;&quot;;&lt;/span&gt;
 &lt;span class=&quot;code-php&quot;&gt;   echo &quot;&amp;lt;/ul&amp;gt;&quot;;&lt;/span&gt;

 &lt;span class=&quot;code-php&quot;&gt;?&amp;gt;&lt;/span&gt;

 &amp;lt;/body&amp;gt;
 &amp;lt;/html&amp;gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;h2&gt;
Loop through an array&lt;/h2&gt;
&amp;nbsp;Now we will look at how you can loop through an array.&lt;br /&gt;
When you know how many elements an array contains, it is not a problem defining the loop. You simply start with 0 and let the loop continue to the number of items available. In the example with the fruits, you would loop through the array like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot; style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; text-align: left;&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; color: #666666; font-family: verdana, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em; text-align: -webkit-auto;&quot;&gt;
&lt;pre style=&quot;color: black; line-height: normal;&quot;&gt; &amp;lt;html&amp;gt;
 &amp;lt;head&amp;gt;
 &amp;lt;title&amp;gt;Array&amp;lt;/title&amp;gt;

 &amp;lt;/head&amp;gt;
 &amp;lt;body&amp;gt;

 &lt;span class=&quot;code-php&quot;&gt;&amp;lt;?php&lt;/span&gt;
 
 &lt;span class=&quot;code-comments&quot;&gt;// Comma separated list&lt;/span&gt;
 &lt;span class=&quot;code-php&quot;&gt;$fruitlist = &quot;apples, pears, bananas, oranges, lemons&quot;;&lt;/span&gt;
  
 &lt;span class=&quot;code-comments&quot;&gt;// Create an array by splitting the list (with a comma as delimiter)&lt;/span&gt;
 &lt;span class=&quot;code-php&quot;&gt;$arrFruits = explode (&quot;,&quot;, $fruitlist);&lt;/span&gt;
  
 &lt;span class=&quot;code-php&quot;&gt;   echo &quot;&amp;lt;p&amp;gt;The list of fruits:&amp;lt;/p&amp;gt;&quot;;&lt;/span&gt;
 &lt;span class=&quot;code-php&quot;&gt;   echo &quot;&amp;lt;ul&amp;gt;&quot;;&lt;/span&gt;
  
 &lt;span class=&quot;code-comments&quot;&gt;   // Loop through the array $arrFruits&lt;/span&gt;
 &lt;span class=&quot;code-php&quot;&gt;   for ($x=0; $x&amp;lt;=4; $x++) {&lt;/span&gt;
 &lt;span class=&quot;code-php&quot;&gt;      echo &quot;&amp;lt;li&amp;gt;&quot; . $arrFruits[$x] . &quot;&amp;lt;/li&amp;gt;&quot;;&lt;/span&gt;
 &lt;span class=&quot;code-php&quot;&gt;   }&lt;/span&gt;
  
 &lt;span class=&quot;code-php&quot;&gt;   echo &quot;&amp;lt;/ul&amp;gt;&quot;;&lt;/span&gt;

 &lt;span class=&quot;code-php&quot;&gt;?&amp;gt;&lt;/span&gt;
  
 &amp;lt;/body&amp;gt;
 &amp;lt;/html&amp;gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;examplelink&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
How to find the size of an array&lt;/h2&gt;
But what if we add another fruit to the list? Then our array will contain one element more - which will get the identification number &lt;strong&gt;5&lt;/strong&gt;. Do you see the problem? Then we need to change the loop, so it runs from 0 to 5, or else not all of the elements will be included.&lt;br /&gt;
Wouldn&#39;t it be nice if we automatically could find out how many elements an array contains?&lt;br /&gt;
That&#39;s exactly what we can do with the function foreach. Now we can make a loop that works regardless of the number of elements:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot; style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; text-align: left;&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; color: #666666; font-family: verdana, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em; text-align: -webkit-auto;&quot;&gt;
&lt;pre style=&quot;color: black; line-height: normal;&quot;&gt; &lt;span class=&quot;code-php&quot;&gt;&amp;lt;?php&lt;/span&gt;
 &lt;span class=&quot;code-php&quot;&gt;   foreach ($arrFruits as $x) {&lt;/span&gt;
 &lt;span class=&quot;code-php&quot;&gt;      echo $x;&lt;/span&gt;
 &lt;span class=&quot;code-php&quot;&gt;   }&lt;/span&gt;
 &lt;span class=&quot;code-php&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;pre&gt; &lt;/pre&gt;
&lt;/div&gt;
This loop will work regardless of how many or few elements the array contains.&lt;br /&gt;
&lt;h2&gt;
Another example&lt;/h2&gt;
Below is another example of how you can use an array to write the name of the month:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot; style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; text-align: left;&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; color: #666666; font-family: verdana, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em; text-align: -webkit-auto;&quot;&gt;
&lt;pre style=&quot;color: black; line-height: normal;&quot;&gt; &amp;lt;html&amp;gt;
 &amp;lt;head&amp;gt;
 &amp;lt;title&amp;gt;Array&amp;lt;/title&amp;gt;

 &amp;lt;/head&amp;gt;
 &amp;lt;body&amp;gt;
 
 &lt;span class=&quot;code-php&quot;&gt;&amp;lt;?php&lt;/span&gt;
 &lt;span class=&quot;code-comments&quot;&gt;// Creates array with each month.&lt;/span&gt;
 &lt;span class=&quot;code-comments&quot;&gt;// Creates array with the months. Note the comma before January - because there is no month with the number 0&lt;/span&gt;
 &lt;span class=&quot;code-php&quot;&gt;$arrMonths = array(&quot;&quot;,&quot;January&quot;,&quot;February&quot;,&quot;March&quot;,&quot;April&quot;,&quot;May&quot;,&quot;June&quot;,&quot;July&quot;,&quot;August&quot;,&quot;September&quot;,&quot;October&quot;,&quot;November&quot;,&quot;December&quot;);&lt;/span&gt;
  
 &lt;span class=&quot;code-comments&quot;&gt;// Call the array with the number of the month - write to the client&lt;/span&gt;
 &lt;span class=&quot;code-php&quot;&gt;echo $arrMonths[date(&quot;n&quot;)];&lt;/span&gt;
 &lt;span class=&quot;code-php&quot;&gt;?&amp;gt;&lt;/span&gt;

 &amp;lt;/body&amp;gt;
 &amp;lt;/html&amp;gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;pre&gt; &lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prog-teach.blogspot.com/feeds/7253986955512084560/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prog-teach.blogspot.com/2012/04/arrays-in-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/7253986955512084560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/7253986955512084560'/><link rel='alternate' type='text/html' href='http://prog-teach.blogspot.com/2012/04/arrays-in-php.html' title='Arrays In PHP'/><author><name>Yahya prog</name><uri>http://www.blogger.com/profile/01103381213725850855</uri><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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3v7pOUIJq2SK1qoXSqX0SsfPXtJLwB8cVLavehc0ppVlAIPcjzsDr-2i7ubYwv1Tm-HV2oggSp6Vzvc1HrGohShK8AUa9mS-8RV_m6DLMbKKOPuXNCTQPLk5zrpHONbd9F1c3r8S5z_0/s72-c/php-icone-6255-96.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6179249185834200605.post-8947778929896429634</id><published>2012-04-01T04:14:00.004-07:00</published><updated>2012-04-01T04:22:03.779-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Meta Function</title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3v7pOUIJq2SK1qoXSqX0SsfPXtJLwB8cVLavehc0ppVlAIPcjzsDr-2i7ubYwv1Tm-HV2oggSp6Vzvc1HrGohShK8AUa9mS-8RV_m6DLMbKKOPuXNCTQPLk5zrpHONbd9F1c3r8S5z_0/s1600/php-icone-6255-96.png&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;refsect1 description&quot; id=&quot;refsect1-function.get-meta-tags-description&quot;&gt;
&lt;div class=&quot;methodsynopsis dc-description&quot;&gt;
&lt;span class=&quot;type&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;methodsynopsis dc-description&quot;&gt;
&lt;span class=&quot;type&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;methodsynopsis dc-description&quot;&gt;
&lt;span class=&quot;type&quot;&gt;array&lt;/span&gt; &lt;span class=&quot;methodname&quot;&gt;&lt;strong&gt;get_meta_tags&lt;/strong&gt;&lt;/span&gt;    ( &lt;span class=&quot;methodparam&quot;&gt;&lt;span class=&quot;type&quot;&gt;string&lt;/span&gt; &lt;code class=&quot;parameter&quot;&gt;$filename&lt;/code&gt;&lt;/span&gt;   [, &lt;span class=&quot;methodparam&quot;&gt;&lt;span class=&quot;type&quot;&gt;bool&lt;/span&gt; &lt;code class=&quot;parameter&quot;&gt;$use_include_path&lt;/code&gt;&lt;span class=&quot;initializer&quot;&gt; = false&lt;/span&gt;&lt;/span&gt;  ] )&lt;/div&gt;
&lt;div class=&quot;methodsynopsis dc-description&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;para rdfs-comment&quot;&gt;
Opens &lt;em&gt;&lt;code class=&quot;parameter&quot;&gt;filename&lt;/code&gt;&lt;/em&gt; and parses it line by line for   &amp;lt;meta&amp;gt; tags in the file. The parsing stops at   &lt;em&gt;&amp;lt;/head&amp;gt;&lt;/em&gt;.&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;refsect1 parameters&quot; id=&quot;refsect1-function.get-meta-tags-parameters&quot;&gt;
&lt;h3 class=&quot;title&quot;&gt;

Parameters&lt;/h3&gt;
&lt;div class=&quot;para&quot;&gt;
&lt;/div&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;span class=&quot;term&quot;&gt;&lt;em&gt;&lt;code class=&quot;parameter&quot;&gt;filename&lt;/code&gt;&lt;/em&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;div class=&quot;para&quot;&gt;
The path to the HTML file, as a string. This can be a local file or an       &lt;acronym title=&quot;Uniform Resource Locator&quot;&gt;URL&lt;/acronym&gt;.      &lt;/div&gt;
&lt;div class=&quot;para&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; id=&quot;example-3754&quot;&gt;
&lt;strong&gt;Example #1 What &lt;span class=&quot;function&quot;&gt;&lt;strong&gt;get_meta_tags()&lt;/strong&gt;&lt;/span&gt; parses&lt;/strong&gt;&lt;br /&gt;
&lt;div class=&quot;example-contents&quot;&gt;
&lt;div class=&quot;htmlcode&quot;&gt;
&lt;pre class=&quot;htmlcode&quot;&gt;&amp;lt;meta name=&quot;author&quot; content=&quot;name&quot;&amp;gt;
&amp;lt;meta name=&quot;keywords&quot; content=&quot;php documentation&quot;&amp;gt;
&amp;lt;meta name=&quot;DESCRIPTION&quot; content=&quot;a php manual&quot;&amp;gt;
&amp;lt;meta name=&quot;geo.position&quot; content=&quot;49.33;-86.59&quot;&amp;gt;
&amp;lt;/head&amp;gt; &amp;lt;!-- parsing stops here --&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
(pay attention to line endings - PHP uses a native function to       parse the input, so a Mac file won&#39;t work on Unix).      &lt;/dd&gt;
&lt;dt&gt;&lt;span class=&quot;term&quot;&gt;&lt;em&gt;&lt;code class=&quot;parameter&quot;&gt;use_include_path&lt;/code&gt;&lt;/em&gt;&lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;div class=&quot;para&quot;&gt;
Setting &lt;em&gt;&lt;code class=&quot;parameter&quot;&gt;use_include_path&lt;/code&gt;&lt;/em&gt; to &lt;strong&gt;&lt;code&gt;TRUE&lt;/code&gt;&lt;/strong&gt; will result       in PHP trying to open the file along the standard include path as per       the include_path directive.       This is used for local files, not URLs.&lt;/div&gt;
&lt;/dd&gt;&lt;/dl&gt;
&lt;/div&gt;
&lt;div class=&quot;refsect1 returnvalues&quot; id=&quot;refsect1-function.get-meta-tags-returnvalues&quot;&gt;
&lt;h3 class=&quot;title&quot;&gt;

&amp;nbsp;Return Values&lt;/h3&gt;
&lt;div class=&quot;para&quot;&gt;
Returns an array with all the parsed meta tags.  &lt;/div&gt;
&lt;div class=&quot;para&quot;&gt;
The value of the name property becomes the key, the value of the content   property becomes the value of the returned array, so you can easily use   standard array functions to traverse it or access single values.    Special characters in the value of the name property are substituted with   &#39;_&#39;, the rest is converted to lower case.  If two meta tags have the same   name, only the last one is returned.&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;refsect1 examples&quot; id=&quot;refsect1-function.get-meta-tags-examples&quot;&gt;
&lt;h3 class=&quot;title&quot;&gt;

Examples&lt;/h3&gt;
&lt;div class=&quot;para&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; id=&quot;example-3755&quot;&gt;
&lt;strong&gt;Example #1 What &lt;span class=&quot;function&quot;&gt;&lt;strong&gt;get_meta_tags()&lt;/strong&gt;&lt;/span&gt; returns&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot; style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; text-align: left;&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; color: #666666; font-family: verdana, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;span style=&quot;color: #ff8000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;// Assuming the above tags are at www.example.com&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;$tags&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;get_meta_tags&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&#39;http://www.example.com/&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;color: #ff8000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;// Notice how the keys are all lowercase now, and&lt;br /&gt;// how . was replaced by _ in the key.&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;$tags&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&#39;author&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;];&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;// name&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;$tags&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&#39;keywords&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;];&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;// php documentation&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;$tags&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&#39;description&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;];&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;// a php manual&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;$tags&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&#39;geo_position&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;];&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;// 49.33;-86.59&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;?&amp;gt;&lt;/span&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;example-contents&quot;&gt;
&lt;div class=&quot;phpcode&quot;&gt;
&lt;span style=&quot;color: #0000bb; font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;phpcode&quot;&gt;
&lt;code&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class=&quot;phpcode&quot;&gt;
&lt;code&gt;&lt;/code&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
&lt;code&gt;&lt;strong&gt;Example #2 What&amp;nbsp;&lt;span class=&quot;function&quot;&gt;&lt;strong&gt;get_meta_tags()&lt;/strong&gt;&lt;/span&gt;&amp;nbsp;returns&lt;/strong&gt;&lt;/code&gt;&lt;/div&gt;
&lt;code&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot; style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif; line-height: 20px; text-align: left;&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; font-family: verdana, arial, helvetica, sans-serif; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em; text-align: -webkit-auto;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;span class=&quot;default&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;function &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;get_meta_data&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$content&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;)&lt;br /&gt;{&lt;br /&gt;    &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$content &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;strtolower&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$content&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;);&lt;br /&gt;    &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$content &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;preg_replace&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;&#39;&amp;lt;style[^&amp;gt;]*&amp;gt;.*&amp;lt;/style&amp;gt;&#39;siU&quot;&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$content&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;);  &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;// strip js&lt;br /&gt;    &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$content &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;preg_replace&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;&#39;&amp;lt;script[^&amp;gt;]*&amp;gt;.*&amp;lt;/script&amp;gt;&#39;siU&quot;&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$content&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;); &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;// strip css&lt;br /&gt;    &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$split &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;explode&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;\n&quot;&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$content&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;);&lt;br /&gt;    foreach (&lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$split &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;as &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$k &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;=&amp;gt; &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$v&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;)&lt;br /&gt;    {&lt;br /&gt;        if (&lt;/span&gt;&lt;span class=&quot;default&quot;&gt;strpos&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&#39; &#39;&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$v&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&#39;&amp;lt;meta&#39;&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;)) {&lt;br /&gt;             &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;preg_match_all&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;/&amp;lt;meta[^&amp;gt;]+(http\-equiv|name)=\&quot;([^\&quot;]*)\&quot;[^&amp;gt;]&quot; &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;+content=\&quot;([^\&quot;]*)\&quot;[^&amp;gt;]*&amp;gt;/i&quot;&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$v&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$split_content&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;[],&lt;/span&gt;&lt;span class=&quot;default&quot;&gt;PREG_PATTERN_ORDER&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;);;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    return &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$split_content&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;;&lt;br /&gt;}&lt;/span&gt;&lt;span class=&quot;default&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;example-contents&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;example-contents&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
&lt;strong&gt;&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;Example #3 What&amp;nbsp;&lt;span class=&quot;function&quot;&gt;&lt;strong&gt;get_meta_tags()&lt;/strong&gt;&lt;/span&gt;&amp;nbsp;returns&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot; style=&quot;background-color: white; font-family: Arial, Helvetica, sans-serif; line-height: 20px; text-align: left;&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; font-family: verdana, arial, helvetica, sans-serif; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em; text-align: -webkit-auto;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;span class=&quot;default&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;/*&lt;br /&gt;** Extracts and formats meta tag content &lt;br /&gt;*/&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;function &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;get_meta_data&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$url&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$searchkey&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;) {    &lt;br /&gt;    &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$data &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;get_meta_tags&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$url&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;);    &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;// get the meta data in an array&lt;br /&gt;    &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;foreach(&lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$data &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;as &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$key &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;=&amp;gt; &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$value&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;) {&lt;br /&gt;        if(&lt;/span&gt;&lt;span class=&quot;default&quot;&gt;mb_detect_encoding&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$value&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&#39;UTF-8, ISO-8859-1&#39;&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;) != &lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&#39;ISO-8859-1&#39;&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;) {    &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;// check whether the content is UTF-8 or ISO-8859-1&lt;br /&gt;            &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$value &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;utf8_decode&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$value&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;);    &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;// if UTF-8 decode it&lt;br /&gt;        &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;}&lt;br /&gt;        &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$value &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;strtr&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$value&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;get_html_translation_table&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;default&quot;&gt;HTML_ENTITIES&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;));    &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;// mask the content&lt;br /&gt;        &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;if(&lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$searchkey &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;!= &lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;) {    &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;// if only one meta tag is in demand e.g. &#39;description&#39;&lt;br /&gt;            &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;if(&lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$key &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;== &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$searchkey&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;) {&lt;br /&gt;                &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$str &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$value&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;;    &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;// just return the value&lt;br /&gt;            &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;}&lt;br /&gt;        } else {    &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;// all meta tags&lt;br /&gt;            &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$pattern &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&#39;/ |,/i&#39;&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;;    &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;// &#39; &#39; or &#39;,&#39;&lt;br /&gt;            &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$array &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;= &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;preg_split&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$pattern&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$value&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;, -&lt;/span&gt;&lt;span class=&quot;default&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;PREG_SPLIT_NO_EMPTY&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;);    &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;// split it in an array, so we have the count of words            &lt;br /&gt;            &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$str &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;.= &lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&#39;&amp;lt;p&amp;gt;&amp;lt;span style=&quot;display:block;color:#000000;font-weight:bold;&quot;&amp;gt;&#39; &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$key &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&#39; &amp;lt;span style=&quot;font-weight:normal;&quot;&amp;gt;(&#39; &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;count&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$array&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;) . &lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&#39; words | &#39; &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;strlen&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$value&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;) . &lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&#39; chars)&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&#39; &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$value &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;. &lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&#39;&amp;lt;/p&amp;gt;&#39;&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;;    &lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;// format data with count of words and chars&lt;br /&gt;        &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;}&lt;br /&gt;    }&lt;br /&gt;    return &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$str&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;;&lt;br /&gt;}&lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$content &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;.= &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;get_meta_data&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;&lt;a href=&quot;http://www.example.com/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;http://www.example.com/&lt;/a&gt;&quot;&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;/*&lt;br /&gt;output looks like this:&lt;br /&gt;&lt;br /&gt;description (23 words | 167 chars)&lt;br /&gt;SELFHTML 8.1.2 - Die bekannte Dokumentation zu HTML, JavaScript und CGI/Perl - Tutorial und Referenz, mit etlichen Zusatztips zu Design, Grafik, Projektverwaltung usw.&lt;br /&gt;&lt;br /&gt;keywords (13 words | 119 chars)&lt;br /&gt;SELFHTML, HTML, Dynamic HTML, JavaScript, CGI, Perl, Grafik, WWW-Seiten, Web-Seiten, Hilfe, Dokumentation, Beschreibung&lt;br /&gt;&lt;br /&gt;etc.&lt;br /&gt;&lt;br /&gt;*/&lt;/span&gt;&lt;span class=&quot;default&quot;&gt;$content &lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;.= &lt;/span&gt;&lt;span class=&quot;default&quot;&gt;get_meta_data&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;&lt;a href=&quot;http://www.example.com/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;http://www.example.com/&lt;/a&gt;&quot;&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;description&quot;&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;default&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: monospace;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;example-contents&quot;&gt;
&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prog-teach.blogspot.com/feeds/8947778929896429634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prog-teach.blogspot.com/2012/04/meta-function.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/8947778929896429634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/8947778929896429634'/><link rel='alternate' type='text/html' href='http://prog-teach.blogspot.com/2012/04/meta-function.html' title='Meta Function'/><author><name>Yahya prog</name><uri>http://www.blogger.com/profile/01103381213725850855</uri><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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3v7pOUIJq2SK1qoXSqX0SsfPXtJLwB8cVLavehc0ppVlAIPcjzsDr-2i7ubYwv1Tm-HV2oggSp6Vzvc1HrGohShK8AUa9mS-8RV_m6DLMbKKOPuXNCTQPLk5zrpHONbd9F1c3r8S5z_0/s72-c/php-icone-6255-96.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6179249185834200605.post-3828222262050511574</id><published>2012-04-01T04:09:00.002-07:00</published><updated>2012-04-01T04:09:31.223-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Var &quot;GET&quot; In PHP</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;refsect1 description&quot; id=&quot;refsect1-reserved.variables.get-description&quot;&gt;
&lt;div class=&quot;simpara&quot; style=&quot;text-align: center;&quot;&gt;
&lt;var class=&quot;varname&quot;&gt;&lt;var class=&quot;varname&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3v7pOUIJq2SK1qoXSqX0SsfPXtJLwB8cVLavehc0ppVlAIPcjzsDr-2i7ubYwv1Tm-HV2oggSp6Vzvc1HrGohShK8AUa9mS-8RV_m6DLMbKKOPuXNCTQPLk5zrpHONbd9F1c3r8S5z_0/s1600/php-icone-6255-96.png&quot; /&gt;&lt;/var&gt;&lt;/var&gt;&lt;/div&gt;
&lt;div class=&quot;simpara&quot;&gt;
&lt;var class=&quot;varname&quot;&gt;&lt;var class=&quot;varname&quot;&gt;&lt;br /&gt;&lt;/var&gt;&lt;/var&gt;&lt;/div&gt;
&lt;div class=&quot;simpara&quot;&gt;
&lt;var class=&quot;varname&quot;&gt;&lt;var class=&quot;varname&quot;&gt;$HTTP_GET_VARS&lt;/var&gt;&lt;/var&gt; contains the same initial   information, but is not a superglobal.   (Note that&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;simpara&quot;&gt;
&lt;var class=&quot;varname&quot;&gt;&lt;var class=&quot;varname&quot;&gt;$HTTP_GET_VARS&lt;/var&gt;&lt;/var&gt; and &lt;var class=&quot;varname&quot;&gt;&lt;var class=&quot;varname&quot;&gt;$_GET&lt;/var&gt;&lt;/var&gt;   are different variables and that PHP handles them as such)  &lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;refsect1 changelog&quot; id=&quot;refsect1-reserved.variables.get-changelog&quot;&gt;
&lt;div class=&quot;reportbug&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;refsect1 examples&quot; id=&quot;refsect1-reserved.variables.get-examples&quot;&gt;
&lt;div class=&quot;para&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; id=&quot;variable.get.basic&quot;&gt;
&lt;strong&gt;Example #1 &lt;var class=&quot;varname&quot;&gt;&lt;var class=&quot;varname&quot;&gt;$_GET&lt;/var&gt;&lt;/var&gt; example&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot; style=&quot;background-color: white; text-align: left;&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em; text-align: left;&quot;&gt;
&lt;div class=&quot;example-contents&quot; style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;div class=&quot;phpcode&quot;&gt;
&lt;code&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&#39;Hello &#39;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;htmlspecialchars&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;$_GET&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&quot;name&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;]) .&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000;&quot;&gt;&#39;!&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div class=&quot;example-contents&quot; style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;
Assuming the user entered http://example.com/?name=Hannes&lt;/div&gt;
&lt;div class=&quot;example-contents&quot; style=&quot;text-align: -webkit-auto;&quot;&gt;
The above example will output something similar to:&lt;/div&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;Hello Hannes!&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prog-teach.blogspot.com/feeds/3828222262050511574/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prog-teach.blogspot.com/2012/04/var-get-in-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/3828222262050511574'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/3828222262050511574'/><link rel='alternate' type='text/html' href='http://prog-teach.blogspot.com/2012/04/var-get-in-php.html' title='Var &quot;GET&quot; In PHP'/><author><name>Yahya prog</name><uri>http://www.blogger.com/profile/01103381213725850855</uri><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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3v7pOUIJq2SK1qoXSqX0SsfPXtJLwB8cVLavehc0ppVlAIPcjzsDr-2i7ubYwv1Tm-HV2oggSp6Vzvc1HrGohShK8AUa9mS-8RV_m6DLMbKKOPuXNCTQPLk5zrpHONbd9F1c3r8S5z_0/s72-c/php-icone-6255-96.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6179249185834200605.post-8676681811658166647</id><published>2012-04-01T03:15:00.001-07:00</published><updated>2012-04-01T03:15:34.452-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="XML"/><title type='text'>Your first step in XML , Introduction</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIh_8fiwUBE1pDa08ApM7poa8Ie5iF93k8syYwBO6hVqUFWYE-ZtykZuBb6Drt4TLxqVKFF_y0QKKP4qBAqH3Ibp3oA92z08B1tjntUp0gJoeR8JfBGST_p954kByTNelKfL-KdSpl4Sc/s1600/imgres.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIh_8fiwUBE1pDa08ApM7poa8Ie5iF93k8syYwBO6hVqUFWYE-ZtykZuBb6Drt4TLxqVKFF_y0QKKP4qBAqH3Ibp3oA92z08B1tjntUp0gJoeR8JfBGST_p954kByTNelKfL-KdSpl4Sc/s200/imgres.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;
The following points explain the purpose of XML.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; list-style-position: inside; list-style-type: decimal; margin-bottom: 2px; margin-left: 2px; margin-right: 2px; margin-top: 2px; padding-bottom: 2px; padding-left: 2px; padding-right: 2px; padding-top: 2px; text-align: left;&quot;&gt;
&lt;li style=&quot;list-style-position: inside; list-style-type: square; margin-left: 2em; padding-top: 0.5em;&quot;&gt;XML stands for E&lt;b&gt;X&lt;/b&gt;tensible&amp;nbsp;&lt;b&gt;M&lt;/b&gt;arkup&amp;nbsp;&lt;b&gt;L&lt;/b&gt;anguage&lt;/li&gt;
&lt;li style=&quot;list-style-position: inside; list-style-type: square; margin-left: 2em; padding-top: 0.5em;&quot;&gt;XML is a&amp;nbsp;&lt;b&gt;markup language&lt;/b&gt;&amp;nbsp;much like HTML.&lt;/li&gt;
&lt;li style=&quot;list-style-position: inside; list-style-type: square; margin-left: 2em; padding-top: 0.5em;&quot;&gt;XML was designed to&amp;nbsp;&lt;b&gt;describe data&lt;/b&gt;&lt;i&gt;.&lt;/i&gt;&lt;/li&gt;
&lt;li style=&quot;list-style-position: inside; list-style-type: square; margin-left: 2em; padding-top: 0.5em;&quot;&gt;XML tags are not predefined in XML. You must&amp;nbsp;&lt;b&gt;define your own tags&lt;/b&gt;.&lt;/li&gt;
&lt;li style=&quot;list-style-position: inside; list-style-type: square; margin-left: 2em; padding-top: 0.5em;&quot;&gt;XML uses a DTD (&lt;b&gt;Document Type Definition&lt;/b&gt;) to describe the data.&lt;/li&gt;
&lt;li style=&quot;list-style-position: inside; list-style-type: square; margin-left: 2em; padding-top: 0.5em;&quot;&gt;XML with a DTD is designed to be&amp;nbsp;&lt;b&gt;self describing&lt;/b&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;
The Latest Specifications on XML which are released from W3C Working Group can be viewed here.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;
It is important to understand that XML is not a replacement for HTML. The main purpose of HTML is the Format the Data that is presented through Browser. For Displaying data on Handheld Devices WML is used. The purpose of XML is not to Format the Data to be displayed. It&#39;s mostly used to store and transfer data and to describe the data. It is device or Language independent and can be used for Transmitting Data to any device. The Parser (Or the Program which is capable of understanding the Tags and returning the Text in a Valid Format) on the corresponding Device will help in displaying the data in required format.&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px;&quot;&gt;
You can define your own tags in XML file. The way these tags will be interpreted will depend on the program which is going to get this XML file. The data embedded within these tags will be used according to logic implemented in the secondary program which is going to get this XML as Feed. This point will be more clear hen we start explaining you about how to use the Parsers in next few pages.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prog-teach.blogspot.com/feeds/8676681811658166647/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prog-teach.blogspot.com/2012/04/your-first-step-in-xml-introduction.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/8676681811658166647'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/8676681811658166647'/><link rel='alternate' type='text/html' href='http://prog-teach.blogspot.com/2012/04/your-first-step-in-xml-introduction.html' title='Your first step in XML , Introduction'/><author><name>Yahya prog</name><uri>http://www.blogger.com/profile/01103381213725850855</uri><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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIh_8fiwUBE1pDa08ApM7poa8Ie5iF93k8syYwBO6hVqUFWYE-ZtykZuBb6Drt4TLxqVKFF_y0QKKP4qBAqH3Ibp3oA92z08B1tjntUp0gJoeR8JfBGST_p954kByTNelKfL-KdSpl4Sc/s72-c/imgres.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6179249185834200605.post-1800617113227154481</id><published>2012-04-01T03:12:00.001-07:00</published><updated>2012-04-01T03:12:12.178-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JQUERY"/><title type='text'>What is JQUERY ?</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAei01gMctspoOg3kRqoxzvrX-iG4DHT1-3j-Ahh8-h4la0rlBoMoe5wcwXdhDjyl4CQF3Nhh-DMCLnt51CoO0BqkRK8LbfIyxAkXN5dPane1TdaeL0ULNCieLSbrzlxAuhi1zdL6aqQc/s1600/jquery_cheat_sheet_icon.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAei01gMctspoOg3kRqoxzvrX-iG4DHT1-3j-Ahh8-h4la0rlBoMoe5wcwXdhDjyl4CQF3Nhh-DMCLnt51CoO0BqkRK8LbfIyxAkXN5dPane1TdaeL0ULNCieLSbrzlxAuhi1zdL6aqQc/s1600/jquery_cheat_sheet_icon.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
jQuery is an amazing JavaScript library that makes it easy to create wonderful web effects in just a few lines of code. As the website says:”&lt;br /&gt;
&lt;blockquote&gt;
“jQuery is a JavaScript library that takes this motto to heart: Writing JavaScript code should be fun. jQuery achieves this goal by taking common, repetitive, tasks, stripping out all the unnecessary markup, and leaving them short, smart and understandable.”&lt;/blockquote&gt;
Maybe you are thinkingâ€¦ “Why I would need another JavaScript library”? Just give a try and you will see how simple and powerful it is even if you have already used Moo.fx, Scriptaculous, TW-SACK or Prototype.&lt;br /&gt;
&lt;h2&gt;
Why I should use jQuery?&lt;/h2&gt;
Simple. In just one glance at the source code of a page using jQuery you’ll see how easy it is to use, how much it accomplishes in so few lines of code, and how graceful it is.&lt;br /&gt;
My mind was opened one day when I stumbled across some code written with jQuery. I was flipping through the RSS feeds and reading my daily dose of web design blogs when I came across an example of JavaScript loveliness that used jQuery. Truth be told, the code on that site had some browser related bugsâ€¦ but the concept was something I hadn’t seen before.&lt;br /&gt;
&lt;h2&gt;
What about the code?&lt;/h2&gt;
The code looked almost simple. Like nothing I had seen before. It made sense.&lt;br /&gt;
I started reading through the documentation and was amazed to see how much could be done with so little extra code.&lt;br /&gt;
&lt;h2&gt;
When you can use jQuery?&lt;/h2&gt;
You should use jQuery when you need:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;A small library that gives you powerful control over the Document Object Model&lt;/li&gt;
&lt;li&gt;With very little effort or work on your part&lt;/li&gt;
&lt;/ul&gt;
Or&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Quick access to &lt;abbr title=&quot;Asynchronous JavaScript and XML&quot;&gt;AJAX&lt;/abbr&gt;&lt;/li&gt;
&lt;li&gt;Without a lot of bloat (overhead - wasted code)&lt;/li&gt;
&lt;li&gt;And some basic animation effects to spice things up&lt;/li&gt;
&lt;/ul&gt;
Butâ€¦&lt;br /&gt;
If you need super fancy effects for animation, drag and drop, and super smooth animation then youâ€™ll probably want to use Prototype and one of the many great library created to enhance the effects.&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://prog-teach.blogspot.com/feeds/1800617113227154481/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prog-teach.blogspot.com/2012/04/what-is-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/1800617113227154481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/1800617113227154481'/><link rel='alternate' type='text/html' href='http://prog-teach.blogspot.com/2012/04/what-is-jquery.html' title='What is JQUERY ?'/><author><name>Yahya prog</name><uri>http://www.blogger.com/profile/01103381213725850855</uri><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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAei01gMctspoOg3kRqoxzvrX-iG4DHT1-3j-Ahh8-h4la0rlBoMoe5wcwXdhDjyl4CQF3Nhh-DMCLnt51CoO0BqkRK8LbfIyxAkXN5dPane1TdaeL0ULNCieLSbrzlxAuhi1zdL6aqQc/s72-c/jquery_cheat_sheet_icon.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6179249185834200605.post-1671937950345634960</id><published>2012-04-01T03:08:00.000-07:00</published><updated>2012-04-01T03:08:00.136-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CSS"/><title type='text'>What Is CSS ?</title><content type='html'>&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;img height=&quot;150px&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEje950e9e85ZoAV3vLbjGklHsrJngBQRQ0UFG-WWMP9Z7YfKg_6TXUcmYsaCyUJGwcgL972jdwdBMkYTQ7hW-3KuDTm6L0ZHgcFnLh-ySChdc5ZNp9kR-1vTpGKc-_54ojYQNRSWAtIXKA/s200/Document%2520Code%2520CSS.jpg&quot; width=&quot;200px&quot; /&gt;&lt;/div&gt;
&lt;br /&gt;
CSS is an acronym for &lt;b&gt;C&lt;/b&gt;ascading &lt;b&gt;S&lt;/b&gt;tyle &lt;b&gt;S&lt;/b&gt;heets.&lt;br /&gt;
&lt;h2&gt;

What can I do with CSS?&lt;/h2&gt;
CSS is a style language that defines layout of HTML documents. For example, CSS covers fonts, colours, margins, lines, height, width, background images, advanced positions and many other things. Just wait and see!&lt;br /&gt;
&lt;br /&gt;
HTML can be (mis-)used to add layout to websites. But CSS offers more options and is more accurate and sophisticated. CSS is supported by all browsers today.&lt;br /&gt;
&lt;br /&gt;
After only a few lessons of this tutorial you will be able to make your own style sheets using CSS to give your website a new great look.&lt;br /&gt;
&lt;h2&gt;

What is the difference between CSS and HTML?&lt;/h2&gt;
HTML is used to structure content. CSS is used for formatting structured content.&lt;br /&gt;
&lt;br /&gt;
Okay, it sounds a bit technical and confusing. But please continue reading. It will all make sense to you soon.&lt;br /&gt;
Back in the good old days when Madonna was a virgin and a guy called Tim Berners Lee invented the World Wide Web, the language HTML was only used to add structure to text. An author could mark his text by stating &quot;this is a headline&quot; or &quot;this is a paragraph&quot; using HTML tags such as &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;.&lt;br /&gt;
&lt;br /&gt;
As the Web gained popularity, designers started looking for possibilities to add layout to online documents. To meet this demand, the browser producers (at that time Netscape and Microsoft) invented new HTML tags such as for example &lt;code&gt;&amp;lt;font&amp;gt;&lt;/code&gt; which differed from the original HTML tags by defining layout - and not structure.&lt;br /&gt;
&lt;br /&gt;
This also led to a situation where original structure tags such as &amp;lt;table&amp;gt; were increasingly being misused to layout pages instead of adding structure to text. Many new layout tags such as &amp;lt;blink&amp;gt; were only supported by one type of browser. &quot;You need browser X to view this page&quot; became a common disclaimer on web sites. &lt;br /&gt;
&lt;br /&gt;
CSS was invented to remedy this situation by providing web designers with sophisticated layout opportunities supported by all browsers. At the same time, separation of the presentation style of documents from the content of documents, makes site maintenance a lot easier.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://prog-teach.blogspot.com/feeds/1671937950345634960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prog-teach.blogspot.com/2012/04/what-is-css.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/1671937950345634960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/1671937950345634960'/><link rel='alternate' type='text/html' href='http://prog-teach.blogspot.com/2012/04/what-is-css.html' title='What Is CSS ?'/><author><name>Yahya prog</name><uri>http://www.blogger.com/profile/01103381213725850855</uri><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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEje950e9e85ZoAV3vLbjGklHsrJngBQRQ0UFG-WWMP9Z7YfKg_6TXUcmYsaCyUJGwcgL972jdwdBMkYTQ7hW-3KuDTm6L0ZHgcFnLh-ySChdc5ZNp9kR-1vTpGKc-_54ojYQNRSWAtIXKA/s72-c/Document%2520Code%2520CSS.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6179249185834200605.post-8517109374637402184</id><published>2012-04-01T03:04:00.000-07:00</published><updated>2012-04-01T03:04:21.371-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JAVASCRIPT"/><title type='text'>What Is JAVASCRIPT ?</title><content type='html'>&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT4MbhxvW5clDsPSzAizbk3-Vmb6B2ZMMnjtVvhLX4ZMU51Nbuvdu38lLe5J-oDJnO1gSlo20rvBKZW4KqzO-S1LeqSx_0YepGhpIO75YjEWR9VeoNgrvYYU55GIhYBRidI9YfvmAf7hc/s1600/icon_javascript%5B1%5D.png&quot; /&gt;&lt;/div&gt;
&lt;br /&gt;
The first thing that creates some confusion about JavaScript is its name.  In fact, one of the most common questions students raise when approaching JavaScript is:&lt;br /&gt;
&lt;blockquote&gt;
&lt;em&gt;&quot;Is JavaScript the same as Java?&quot;.&lt;/em&gt;&lt;/blockquote&gt;
Clearing up this basic but important question is our first order of business in this lesson, but by no means the only one.  By the end of this lesson you will also know:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;the difference between JavaScript and Java;&lt;/li&gt;
&lt;li&gt;what JavaScript can and cannot do.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
Are JavaScript and Java the same thing?&lt;/h2&gt;
&lt;strong&gt;No, they are not&lt;/strong&gt;.&lt;br /&gt;
&lt;strong&gt;Java&lt;/strong&gt; (developed by Sun Microsystems) is a powerful and much more complex programming language in the same category as C and C++.&lt;br /&gt;
&lt;strong&gt;JavaScript&lt;/strong&gt; was created by &lt;strong&gt;Brendan Eich&lt;/strong&gt; at &lt;strong&gt;Netscape&lt;/strong&gt; and was first introduced in December 1995 under the name of &lt;em&gt;LiveScript&lt;/em&gt;.  However, it was rather quickly renamed JavaScript, although JavaScript’s official name is &lt;strong&gt;ECMAScript&lt;/strong&gt;, which is developed and maintained by the&lt;strong&gt;ECMA (European Computer Manufacturer&#39;s Association)&lt;/strong&gt; International organization.&lt;br /&gt;
JavaScript is a scripting language, that is, a lightweight programming language that is &lt;strong&gt;interpreted&lt;/strong&gt; by the browser engine when the web page is loaded.&lt;br /&gt;
The fact that the JavaScript interpreter is the browser engine itself accounts for some inconsistencies in the way your JavaScript-powered page might behave in different browsers.  But don&#39;t worry: thankfully, well-established techniques and powerful JavaScript libraries such as &lt;strong&gt;jQuery&lt;/strong&gt; (which will be introduced in later lessons) are here to make things wonderfully easier on us.&lt;br /&gt;
&lt;h2&gt;
Things you &lt;em&gt;can&#39;t&lt;/em&gt; do with JavaScript&lt;/h2&gt;
&lt;strong&gt;You can&#39;t force JavaScript on a browser.&lt;/strong&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
JavaScript runs in the &lt;strong&gt;client&lt;/strong&gt;, that is, the brower.  If you use an older browser without support for JavaScript, or if you simply choose to disable JavaScript in your browser, then a JavaScript script can&#39;t work.&lt;br /&gt;
&lt;br /&gt;
Conclusion: unlike what happens with languages that run on the &lt;strong&gt;server&lt;/strong&gt;, such as PHP, you never fully know for sure the impact that the browser your website visitors are going to use will have on your script, or whether your visitors will choose to turn JavaScript support off.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;You can&#39;t access or affect resources from another internet domain with JavaScript.&lt;/strong&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
This is called the &lt;strong&gt;Same Origin Policy&lt;/strong&gt;.  Well, how would you like it if all of a sudden all the nice comments your visitors left on your website started to disappear, or to change place in your page because of a naughty JavaScript script running on another website?&lt;br /&gt;
&lt;br /&gt;
This is exactly the kind of nasty situation that the Same Origin Policy is designed to prevent.  Conclusion: your JavaScript script can only access resources in your website.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;You can&#39;t access server resources with JavaScript.&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
Because JavaScript is a client-side language, it&#39;s limited to what can be done in the client, that is, usually in the browser environment.  A JavaScript script cannot access server resources such as databases.&lt;br /&gt;
&lt;h2&gt;
Zillion things you &lt;em&gt;can&lt;/em&gt; do with JavaScript&lt;/h2&gt;
&lt;h3&gt;
With JavaScript you can:&lt;/h3&gt;
&lt;strong&gt;Put text in an HTML page on-the-fly.&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
Say you want to display a nice thank you message to a user who has just submitted a comment form on your website.  Obviously, the message needs to be added &lt;strong&gt;after&lt;/strong&gt; the user has submitted the form.&lt;br /&gt;
&lt;br /&gt;
You could let the server do that.  However, if your website is very busy and your server processes hundreds of forms a day, it might take a little while for your thank you message to appear to the user.&lt;br /&gt;
&lt;br /&gt;
Here&#39;s JavaScript to the rescue.  Because JavaScript runs in the user&#39;s browser, the thank you note can be added and displayed on the page almost instantaneously, making your website users happy.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Make your web pages responsive.&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
Web environments are dynamic, things happen all the time: the web page loads in the browser, the user clicks a button or moves the mouse over a link, etc.  These are called &lt;strong&gt;events.&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
With JavaScript you can make the page immediately react to these events the way you choose: for example, by showing or hiding specific page elements, by changing the background color, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Detect visitors&#39; browsers.&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
You can use a JavaScript script to detect the visitor’s browser, or, even better, you can detect what features a certain browser does or does not support.  Depending on the browser and its capabilities, you can choose to load a page specifically tailored to that kind of browser .&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Create cookies.&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
A JavaScript script is great if you want to create cookies so that your visitors can enjoy a personalized experience the next time they visit your website .&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Validate web form data.&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
You can use a JavaScript script to validate form data before the form is submitted to a server. This saves the server from extra processing .&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;And much ... much more.&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
Learning JavaScript will enable you to add cool animation effects to your web pages without using an external Flash plug-in, use the newest features of HTML5 such as canvas (to draw directly on your web page) and drag and drop capabilities, integrate your website with external web services such as Facebook, Twitter, etc.&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://prog-teach.blogspot.com/feeds/8517109374637402184/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prog-teach.blogspot.com/2012/04/what-is-javascript.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/8517109374637402184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/8517109374637402184'/><link rel='alternate' type='text/html' href='http://prog-teach.blogspot.com/2012/04/what-is-javascript.html' title='What Is JAVASCRIPT ?'/><author><name>Yahya prog</name><uri>http://www.blogger.com/profile/01103381213725850855</uri><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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT4MbhxvW5clDsPSzAizbk3-Vmb6B2ZMMnjtVvhLX4ZMU51Nbuvdu38lLe5J-oDJnO1gSlo20rvBKZW4KqzO-S1LeqSx_0YepGhpIO75YjEWR9VeoNgrvYYU55GIhYBRidI9YfvmAf7hc/s72-c/icon_javascript%5B1%5D.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6179249185834200605.post-8865297014382868586</id><published>2012-04-01T03:01:00.001-07:00</published><updated>2012-04-01T03:01:20.373-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JAVASCRIPT"/><title type='text'>Your first step in JAVASCRIPT , Introduction</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT4MbhxvW5clDsPSzAizbk3-Vmb6B2ZMMnjtVvhLX4ZMU51Nbuvdu38lLe5J-oDJnO1gSlo20rvBKZW4KqzO-S1LeqSx_0YepGhpIO75YjEWR9VeoNgrvYYU55GIhYBRidI9YfvmAf7hc/s1600/icon_javascript%5B1%5D.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT4MbhxvW5clDsPSzAizbk3-Vmb6B2ZMMnjtVvhLX4ZMU51Nbuvdu38lLe5J-oDJnO1gSlo20rvBKZW4KqzO-S1LeqSx_0YepGhpIO75YjEWR9VeoNgrvYYU55GIhYBRidI9YfvmAf7hc/s1600/icon_javascript%5B1%5D.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;JavaScript&lt;/strong&gt; gives you the freedom to add interactivity and responsiveness to your web pages.&lt;br /&gt;
The aim of this tutorial is to provide you with a thorough, yet accessible introduction to JavaScript using &lt;strong&gt;snappy explanations&lt;/strong&gt; and &lt;strong&gt;practical tasks&lt;/strong&gt; to try out right from the start.&lt;br /&gt;
No prior knowledge of JavaScript is assumed, but because JavaScript sits within and manipulates web pages, in order to be able to follow along, you should already be familiar with &lt;strong&gt;HTML&lt;/strong&gt; and &lt;strong&gt;CSS&lt;/strong&gt;.  If you are new to either or both, you’re advised to step through our HTML and CSS tutorials first.&lt;br /&gt;
JavaScript is a lightweight, easy to learn, scripting language.  It’s used on almost every website to respond to user actions, validate web forms, detect browser support, and much more.&lt;br /&gt;
JavaScript is a web programming language, that is, a language that enables you, the designer of your website, to control how a web page &lt;strong&gt;behaves&lt;/strong&gt;.  This makes JavaScript crucially different from HTML, the language that gives &lt;strong&gt;structure&lt;/strong&gt; to your web documents, and CSS, the language that controls the &lt;strong&gt;appearance&lt;/strong&gt; of web pages.&lt;br /&gt;
If you know other programming languages such as PHP, most programming concepts and basic JavaScript syntax will sound quite familiar to you.  However, if this is not the case, don’t worry: by &lt;strong&gt;following along&lt;/strong&gt; and &lt;strong&gt;experimenting with the code&lt;/strong&gt;, at the end of this hands-on tutorial you’ll be able to spruce up your static web pages with fun effects and fantastic responsiveness for the joy of your website visitors.&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://prog-teach.blogspot.com/feeds/8865297014382868586/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prog-teach.blogspot.com/2012/04/your-first-step-in-javascript.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/8865297014382868586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/8865297014382868586'/><link rel='alternate' type='text/html' href='http://prog-teach.blogspot.com/2012/04/your-first-step-in-javascript.html' title='Your first step in JAVASCRIPT , Introduction'/><author><name>Yahya prog</name><uri>http://www.blogger.com/profile/01103381213725850855</uri><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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT4MbhxvW5clDsPSzAizbk3-Vmb6B2ZMMnjtVvhLX4ZMU51Nbuvdu38lLe5J-oDJnO1gSlo20rvBKZW4KqzO-S1LeqSx_0YepGhpIO75YjEWR9VeoNgrvYYU55GIhYBRidI9YfvmAf7hc/s72-c/icon_javascript%5B1%5D.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6179249185834200605.post-854009330250229426</id><published>2012-04-01T02:57:00.001-07:00</published><updated>2012-04-01T02:57:54.235-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CSS"/><title type='text'>Your first step in CSS , Introduction</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEje950e9e85ZoAV3vLbjGklHsrJngBQRQ0UFG-WWMP9Z7YfKg_6TXUcmYsaCyUJGwcgL972jdwdBMkYTQ7hW-3KuDTm6L0ZHgcFnLh-ySChdc5ZNp9kR-1vTpGKc-_54ojYQNRSWAtIXKA/s1600/Document%2520Code%2520CSS.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEje950e9e85ZoAV3vLbjGklHsrJngBQRQ0UFG-WWMP9Z7YfKg_6TXUcmYsaCyUJGwcgL972jdwdBMkYTQ7hW-3KuDTm6L0ZHgcFnLh-ySChdc5ZNp9kR-1vTpGKc-_54ojYQNRSWAtIXKA/s200/Document%2520Code%2520CSS.jpg&quot; width=&quot;200&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;
Cascading Style Sheets (CSS) is a fantastic tool to add layout to your websites. It can save you a lot of time and it enables you to design websites in a completely new way. CSS is a must for anyone working with web design.&lt;br /&gt;
This tutorial will get you started with CSS in just a few hours. It is easy to understand and it will teach you all the sophisticated techniques.&lt;br /&gt;
Learning CSS is fun. As you go along through the tutorial, remember to take enough time to properly experiment with what you learn in each lesson.&lt;br /&gt;
Using CSS &lt;strong&gt;requires basic experience with HTML&lt;/strong&gt;. If you are not familiar with HTML, please start with our HTML tutorial before moving on to CSS.&lt;br /&gt;
&lt;h2&gt;
Which software do I need?&lt;/h2&gt;
Please avoid using software such as FrontPage, DreamWeaver or Word with this tutorial. Advanced software will not help you learn CSS. Instead, it will limit you and slow down your learning curve significantly.&lt;br /&gt;
&lt;br /&gt;
All you need is a free and simple text editor. &lt;br /&gt;
&lt;br /&gt;
For example, Microsoft Windows comes with a program called Notepad. It is usually located in Accessories in the start menu under Programs. Alternatively, you can use a similar text editor e.g. Pico for Linux or Simple Text for Macintosh.&lt;br /&gt;
&lt;br /&gt;
A simple text editor is ideal for learning HTML and CSS because it doesn&#39;t affect or change the codes you type. That way, your successes and errors can only be attributed to yourself - not the software. &lt;br /&gt;
You can use any browser with this tutorial. We encourage you to always keep your browser updated and use the latest version.&lt;br /&gt;
&lt;br /&gt;
A browser and a simple text editor is all you need.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://prog-teach.blogspot.com/feeds/854009330250229426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prog-teach.blogspot.com/2012/04/your-first-step-in-css-introduction.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/854009330250229426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/854009330250229426'/><link rel='alternate' type='text/html' href='http://prog-teach.blogspot.com/2012/04/your-first-step-in-css-introduction.html' title='Your first step in CSS , Introduction'/><author><name>Yahya prog</name><uri>http://www.blogger.com/profile/01103381213725850855</uri><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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEje950e9e85ZoAV3vLbjGklHsrJngBQRQ0UFG-WWMP9Z7YfKg_6TXUcmYsaCyUJGwcgL972jdwdBMkYTQ7hW-3KuDTm6L0ZHgcFnLh-ySChdc5ZNp9kR-1vTpGKc-_54ojYQNRSWAtIXKA/s72-c/Document%2520Code%2520CSS.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6179249185834200605.post-7612745294137136146</id><published>2012-03-31T10:58:00.002-07:00</published><updated>2012-03-31T10:58:51.989-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HTML"/><title type='text'>Tables In HTML</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&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;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlYysoJ68cDaFkFFusB9mtzqjKAS0ITM8U3hrVz3iZ5rhBGVoZJOVmKSq5U5v9bJjALnLPtr1Fe84oiVBHAbjUrQba-VgsoGut0cXbj1SF3VYkUmuF8Dc6oGWvct-anZKB4_zFspgK1iM/s72-c/imgres.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;72&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlYysoJ68cDaFkFFusB9mtzqjKAS0ITM8U3hrVz3iZ5rhBGVoZJOVmKSq5U5v9bJjALnLPtr1Fe84oiVBHAbjUrQba-VgsoGut0cXbj1SF3VYkUmuF8Dc6oGWvct-anZKB4_zFspgK1iM/s72-c/imgres.jpg&quot; width=&quot;72&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Building tables in HTML may at first seem complicated but if you keep cool and watch your step, it is actually strictly logical - just like everything else in HTML.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Example 1:&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;refsect1 examples&quot; id=&quot;refsect1-function.echo-examples&quot;&gt;
&lt;div class=&quot;example&quot; id=&quot;example-4415&quot;&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot; style=&quot;background-color: white;&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em;&quot;&gt;
&lt;pre&gt;&lt;code&gt; &amp;lt;table&amp;gt;
   &amp;lt;tr&amp;gt;
  &amp;lt;td&amp;gt;Cell 1&amp;lt;/td&amp;gt;
  &amp;lt;td&amp;gt;Cell 2&amp;lt;/td&amp;gt;
   &amp;lt;/tr&amp;gt;
   &amp;lt;tr&amp;gt;
  &amp;lt;td&amp;gt;Cell 3&amp;lt;/td&amp;gt;
  &amp;lt;td&amp;gt;Cell 4&amp;lt;/td&amp;gt;
   &amp;lt;/tr&amp;gt;
 &amp;lt;/table&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; clear: both; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;post-share-buttons&quot; style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0.5em; vertical-align: middle;&quot;&gt;
&lt;span class=&quot;share-button-link-text&quot; style=&quot;display: block; text-indent: -9999px;&quot;&gt;Envoyer par e-mail&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
Will look like this in the browser:&lt;br /&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;refsect1 examples&quot; id=&quot;refsect1-function.echo-examples&quot;&gt;
&lt;div class=&quot;example&quot; id=&quot;example-4415&quot;&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot; style=&quot;background-color: white;&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em;&quot;&gt;
&lt;pre&gt;Cell &lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;1Cell 2Cell 3Cell 4&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; clear: both; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;post-share-buttons&quot; style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0.5em; vertical-align: middle;&quot;&gt;
&lt;span class=&quot;share-button-link-text&quot; style=&quot;display: block; text-indent: -9999px;&quot;&gt;Envoyer par e-ma&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h2&gt;
What&#39;s the difference between &lt;code&gt;&amp;lt;tr&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;td&amp;gt;&lt;/code&gt;?&lt;/h2&gt;
As you will see from the above example, this is probably the most complicated HTML example we have given you so far. Let&#39;s break it down and explain the different tags:&lt;br /&gt;
&lt;strong&gt;3 different elements are used to insert tables:&lt;/strong&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;The opening tag &lt;code&gt;&amp;lt;table&amp;gt;&lt;/code&gt; and the closing tag &lt;code&gt;&amp;lt;/table&amp;gt;&lt;/code&gt; starts and ends the table. Logical.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;tr&amp;gt;&lt;/code&gt; stands for &quot;&lt;strong&gt;t&lt;/strong&gt;able &lt;strong&gt;r&lt;/strong&gt;ow&quot; and starts and ends horizontal rows. Still logical.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;td&amp;gt;&lt;/code&gt; is short for &quot;&lt;strong&gt;t&lt;/strong&gt;able &lt;strong&gt;d&lt;/strong&gt;ata&quot;. This tag starts and ends each cell in the rows of your table. All simple and logical.&lt;/li&gt;
&lt;/ul&gt;
Here is what happens in Example 1: the table starts with a &lt;code&gt;&amp;lt;table&amp;gt;&lt;/code&gt;, followed by a &lt;code&gt;&amp;lt;tr&amp;gt;&lt;/code&gt;, which indicates the beginning of a new row.  Two cells are inserted in this row: &lt;code&gt;&amp;lt;td&amp;gt;&lt;/code&gt;Cell 1&lt;code&gt;&amp;lt;/td&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;td&amp;gt;&lt;/code&gt;Cell 2&lt;code&gt;&amp;lt;/td&amp;gt;&lt;/code&gt;.  The row is hereafter closed with a &lt;code&gt;&amp;lt;/tr&amp;gt;&lt;/code&gt; and a new row &lt;code&gt;&amp;lt;tr&amp;gt;&lt;/code&gt; begins immediately after.  The new row also contains two cells. The table is closed with &lt;code&gt;&amp;lt;/table&amp;gt;&lt;/code&gt;.&lt;br /&gt;
Just to make it clear: &lt;strong&gt;rows are horizontal lines of cells and columns are vertical lines of cells&lt;/strong&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-indent: -9999px;&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; text-indent: 0px;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;refsect1 examples&quot; id=&quot;refsect1-function.echo-examples&quot;&gt;
&lt;div class=&quot;example&quot; id=&quot;example-4415&quot;&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot; style=&quot;background-color: white;&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em;&quot;&gt;
&lt;pre&gt;&lt;table border=&quot;1&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Cell 1&lt;/td&gt;&lt;td&gt;Cell 2&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Cell 3&lt;/td&gt;&lt;td&gt;Cell 4&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; text-indent: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; clear: both; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; text-indent: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;post-share-buttons&quot; style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0.5em; text-indent: 0px; vertical-align: middle;&quot;&gt;
&lt;span class=&quot;share-button-link-text&quot; style=&quot;display: block; text-indent: -9999px;&quot;&gt;Envoyer par e-mail&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;examplebox&quot; style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
Cell 1 and Cell 2 form a row. Cell 1 and Cell 3 form a column.&lt;br /&gt;
In the above example, the table has two rows and two columns. However, a table can have an unlimited number of rows and columns.&lt;br /&gt;
&lt;strong&gt;Example 2:&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;refsect1 examples&quot; id=&quot;refsect1-function.echo-examples&quot;&gt;
&lt;div class=&quot;example&quot; id=&quot;example-4415&quot;&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot; style=&quot;background-color: white;&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em;&quot;&gt;
&lt;pre&gt;&lt;pre&gt;&lt;code&gt; &amp;lt;table&amp;gt;
   &amp;lt;tr&amp;gt;
  &amp;lt;td&amp;gt;Cell 1&amp;lt;/td&amp;gt;
  &amp;lt;td&amp;gt;Cell 2&amp;lt;/td&amp;gt;
  &amp;lt;td&amp;gt;Cell 3&amp;lt;/td&amp;gt;
  &amp;lt;td&amp;gt;Cell 4&amp;lt;/td&amp;gt;
   &amp;lt;/tr&amp;gt;
   &amp;lt;tr&amp;gt;
  &amp;lt;td&amp;gt;Cell 5&amp;lt;/td&amp;gt;
  &amp;lt;td&amp;gt;Cell 6&amp;lt;/td&amp;gt;
  &amp;lt;td&amp;gt;Cell 7&amp;lt;/td&amp;gt;
  &amp;lt;td&amp;gt;Cell 8&amp;lt;/td&amp;gt;
   &amp;lt;/tr&amp;gt;
   &amp;lt;tr&amp;gt;
  &amp;lt;td&amp;gt;Cell 9&amp;lt;/td&amp;gt;
  &amp;lt;td&amp;gt;Cell 10&amp;lt;/td&amp;gt;
  &amp;lt;td&amp;gt;Cell 11&amp;lt;/td&amp;gt;
  &amp;lt;td&amp;gt;Cell 12&amp;lt;/td&amp;gt;
   &amp;lt;/tr&amp;gt;
 &amp;lt;/table&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; clear: both; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;post-share-buttons&quot; style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0.5em; vertical-align: middle;&quot;&gt;
&lt;span class=&quot;share-button-link-text&quot; style=&quot;display: block; text-indent: -9999px;&quot;&gt;Envoyer par e-ma&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
Will look like this in the browser:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;refsect1 examples&quot; id=&quot;refsect1-function.echo-examples&quot;&gt;
&lt;div class=&quot;example&quot; id=&quot;example-4415&quot;&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot; style=&quot;background-color: white;&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em;&quot;&gt;
&lt;pre&gt;&lt;table style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Cell 1&lt;/td&gt;&lt;td&gt;Cell 2&lt;/td&gt;&lt;td&gt;Cell 3&lt;/td&gt;&lt;td&gt;Cell 4&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Cell 5&lt;/td&gt;&lt;td&gt;Cell 6&lt;/td&gt;&lt;td&gt;Cell 7&lt;/td&gt;&lt;td&gt;Cell 8&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Cell 9&lt;/td&gt;&lt;td&gt;Cell 10&lt;/td&gt;&lt;td&gt;Cell 11&lt;/td&gt;&lt;td&gt;Cell 12&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; clear: both; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;post-share-buttons&quot; style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0.5em; vertical-align: middle;&quot;&gt;
&lt;span class=&quot;share-button-link-text&quot; style=&quot;display: block; text-indent: -9999px;&quot;&gt;Envoyer par e-mai&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h2&gt;
Are there any attributes?&lt;/h2&gt;
Of course there are attributes. For example, the border attribute is used to specify the thickness of the border around your table:&lt;br /&gt;
&lt;strong&gt;Example 3:&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;refsect1 examples&quot; id=&quot;refsect1-function.echo-examples&quot;&gt;
&lt;div class=&quot;example&quot; id=&quot;example-4415&quot;&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot; style=&quot;background-color: white;&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em;&quot;&gt;
&lt;pre&gt;&lt;pre&gt;&lt;code&gt; &amp;lt;table border=&quot;1&quot;&amp;gt;
   &amp;lt;tr&amp;gt;
  &amp;lt;td&amp;gt;Cell 1&amp;lt;/td&amp;gt;
  &amp;lt;td&amp;gt;Cell 2&amp;lt;/td&amp;gt;
   &amp;lt;/tr&amp;gt;
   &amp;lt;tr&amp;gt;
  &amp;lt;td&amp;gt;Cell 3&amp;lt;/td&amp;gt;
  &amp;lt;td&amp;gt;Cell 4&amp;lt;/td&amp;gt;
   &amp;lt;/tr&amp;gt;
 &amp;lt;/table&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; clear: both; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;post-share-buttons&quot; style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0.5em; vertical-align: middle;&quot;&gt;
&lt;span class=&quot;share-button-link-text&quot; style=&quot;display: block; text-indent: -9999px;&quot;&gt;Envoyer par e-ma&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;pre&gt; &lt;/pre&gt;
&lt;/div&gt;
Will look like this in the browser:&lt;br /&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;refsect1 examples&quot; id=&quot;refsect1-function.echo-examples&quot;&gt;
&lt;div class=&quot;example&quot; id=&quot;example-4415&quot;&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot; style=&quot;background-color: white;&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em;&quot;&gt;
&lt;pre&gt;&lt;table border=&quot;1&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Cell 1&lt;/td&gt;&lt;td&gt;Cell 2&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Cell 3&lt;/td&gt;&lt;td&gt;Cell 4&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; clear: both; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;post-share-buttons&quot; style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0.5em; vertical-align: middle;&quot;&gt;
&lt;span class=&quot;share-button-link-text&quot; style=&quot;display: block; text-indent: -9999px;&quot;&gt;Envoyer par e-mail&lt;/span&gt;&lt;/div&gt;
The thickness of the border is specified in pixels&lt;br /&gt;
As with images, you can also set the width of a table in pixels - or alternatively in percentage of the screen:&lt;br /&gt;
&lt;strong&gt;Example 4:&lt;/strong&gt;&lt;br /&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;pre&gt; &lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; font-family: &#39;Times New Roman&#39;; white-space: normal;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;refsect1 examples&quot; id=&quot;refsect1-function.echo-examples&quot;&gt;
&lt;div class=&quot;example&quot; id=&quot;example-4415&quot;&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot; style=&quot;background-color: white;&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em;&quot;&gt;
&lt;pre&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;table border=&quot;1&quot; width=&quot;30%&quot;&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; white-space: normal;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; clear: both; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; white-space: normal;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;post-share-buttons&quot; style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0.5em; vertical-align: middle; white-space: normal;&quot;&gt;
&lt;span class=&quot;share-button-link-text&quot; style=&quot;display: block; text-indent: -9999px;&quot;&gt;Envoyer par e-mail&lt;/span&gt;&lt;/div&gt;
&lt;/pre&gt;
&lt;/div&gt;
This example will be displayed in the browser as a table with the width of 30% of the screen. Try it yourself.&lt;br /&gt;
&lt;h2&gt;
More attributes?&lt;/h2&gt;
There are lots of attributes for tables. Here are two more:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;align: specifies the horizontal alignment of the content in the entire table, in a row or in a single cell. For example, left, center or right.&lt;/li&gt;
&lt;li&gt;valign: specifies the vertical alignment of the content in a cell.  For example, top, middle or bottom.&lt;/li&gt;
&lt;/ul&gt;
&lt;strong&gt;Example 5:&lt;/strong&gt;&lt;br /&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;pre&gt; &lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; font-family: &#39;Times New Roman&#39;; white-space: normal;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;refsect1 examples&quot; id=&quot;refsect1-function.echo-examples&quot;&gt;
&lt;div class=&quot;example&quot; id=&quot;example-4415&quot;&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot; style=&quot;background-color: white;&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em;&quot;&gt;
&lt;pre&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;td align=&quot;right&quot; valign=&quot;top&quot;&amp;gt;Cell 1&amp;lt;/td&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; white-space: normal;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; clear: both; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; white-space: normal;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;post-share-buttons&quot; style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-top: 0.5em; vertical-align: middle; white-space: normal;&quot;&gt;
&lt;span class=&quot;share-button-link-text&quot; style=&quot;display: block; text-indent: -9999px;&quot;&gt;Envoyer par e-mail&lt;/span&gt;&lt;/div&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;h2&gt;
What can I insert in my tables?&lt;/h2&gt;
Theoretically, you can insert anything in tables: text, links and images... &lt;strong&gt;BUT tables are meant for presenting tabular data&lt;/strong&gt; (i.e. data which can be meaningfully presented in columns and rows) so refrain from putting things into tables simply because you want them to be placed next to each other.&lt;br /&gt;
In the old days on the Internet - i.e. a few years ago - tables were often used as a layout tool. But if you want to control the presentation of texts and images there is a much cooler way to do it (hint: CSS). But more about that later.&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prog-teach.blogspot.com/feeds/7612745294137136146/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prog-teach.blogspot.com/2012/03/tables-in-html.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/7612745294137136146'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/7612745294137136146'/><link rel='alternate' type='text/html' href='http://prog-teach.blogspot.com/2012/03/tables-in-html.html' title='Tables In HTML'/><author><name>Yahya prog</name><uri>http://www.blogger.com/profile/01103381213725850855</uri><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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlYysoJ68cDaFkFFusB9mtzqjKAS0ITM8U3hrVz3iZ5rhBGVoZJOVmKSq5U5v9bJjALnLPtr1Fe84oiVBHAbjUrQba-VgsoGut0cXbj1SF3VYkUmuF8Dc6oGWvct-anZKB4_zFspgK1iM/s72-c/imgres.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6179249185834200605.post-3888098616832114463</id><published>2012-03-31T06:05:00.003-07:00</published><updated>2012-03-31T07:46:20.795-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>echo function</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3v7pOUIJq2SK1qoXSqX0SsfPXtJLwB8cVLavehc0ppVlAIPcjzsDr-2i7ubYwv1Tm-HV2oggSp6Vzvc1HrGohShK8AUa9mS-8RV_m6DLMbKKOPuXNCTQPLk5zrpHONbd9F1c3r8S5z_0/s1600/php-icone-6255-96.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3v7pOUIJq2SK1qoXSqX0SsfPXtJLwB8cVLavehc0ppVlAIPcjzsDr-2i7ubYwv1Tm-HV2oggSp6Vzvc1HrGohShK8AUa9mS-8RV_m6DLMbKKOPuXNCTQPLk5zrpHONbd9F1c3r8S5z_0/s1600/php-icone-6255-96.png&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;refsect1 description&quot; id=&quot;refsect1-function.echo-description&quot;&gt;
&lt;div class=&quot;para&quot;&gt;
&lt;em&gt;echo&lt;/em&gt; is not actually a function (it is a   language construct), so you are not required to use parentheses   with it. &lt;em&gt;echo&lt;/em&gt; (unlike some other language   constructs) does not behave like a function, so it cannot   always be used in the context of a function. Additionally, if you want to   pass more than one parameter to &lt;em&gt;echo&lt;/em&gt;, the parameters   must not be enclosed within parentheses.  &lt;/div&gt;
&lt;div class=&quot;para&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;para&quot;&gt;
&lt;em&gt;echo&lt;/em&gt; also has a shortcut syntax, where you can   immediately follow the opening tag with an equals sign. This short syntax   only works with the short_open_tag configuration setting   enabled.&lt;/div&gt;
&lt;div class=&quot;para&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;refsect1 examples&quot; id=&quot;refsect1-function.echo-examples&quot;&gt;
&lt;div class=&quot;para&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; id=&quot;example-4415&quot;&gt;
&lt;strong&gt;Example #1 &lt;em&gt;echo&lt;/em&gt; examples&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot; style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px;&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; color: #666666; font-family: verdana, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em; text-align: left;&quot;&gt;
&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&quot;Hello World&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;;&lt;br /&gt;&lt;br /&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&quot;This spans&lt;br /&gt;multiple lines. The newlines will be&lt;br /&gt;output as well&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;;&lt;br /&gt;&lt;br /&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&quot;This spans\nmultiple lines. The newlines will be\noutput as well.&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;;&lt;br /&gt;&lt;br /&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&quot;Escaping characters is done \&quot;Like this\&quot;.&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #ff8000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;// You can use variables inside of an echo statement&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;$foo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&quot;foobar&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;$bar&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&quot;barbaz&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;;&lt;br /&gt;&lt;br /&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&quot;foo is&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;$foo&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;// foo is foobar&lt;br /&gt;&lt;br /&gt;// You can also use arrays&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;$baz&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;= array(&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&quot;value&quot;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;=&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&quot;foo&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;);&lt;br /&gt;&lt;br /&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&quot;this is&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;$baz&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&#39;value&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;]}&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&amp;nbsp;!&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;// this is foo !&lt;br /&gt;&lt;br /&gt;// Using single quotes will print the variable name, not the value&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&#39;foo is $foo&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;// foo is $foo&lt;br /&gt;&lt;br /&gt;// If you are not using any other characters, you can just echo variables&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;$foo&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;// foobar&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;$foo&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;$bar&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;// foobarbarbaz&lt;br /&gt;&lt;br /&gt;// Some people prefer passing multiple parameters to echo over concatenation.&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&#39;This &#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&#39;string &#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&#39;was &#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&#39;made &#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&#39;with multiple parameters.&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;chr&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;);&lt;br /&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&#39;This &#39;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&#39;string &#39;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&#39;was &#39;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&#39;made &#39;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&#39;with concatenation.&#39;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&quot;\n&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;;&lt;br /&gt;&lt;br /&gt;echo &amp;lt;&amp;lt;&amp;lt;END&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;This uses the &quot;here document&quot; syntax to output&lt;br /&gt;multiple lines with&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;$variable&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&amp;nbsp;interpolation. Note&lt;br /&gt;that the here document terminator must appear on a&lt;br /&gt;line with just a semicolon. no extra whitespace!&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;END;&lt;/span&gt;&lt;span style=&quot;color: #ff8000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;// Because echo does not behave like a function, the following code is invalid.&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;$some_var&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;) ? echo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&#39;true&#39;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;: echo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&#39;false&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #ff8000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;// However, the following examples will work:&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;$some_var&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;) ? print&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&#39;true&#39;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;: print&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&#39;false&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;// print is also a construct, but&lt;br /&gt;// it behaves like a function, so&lt;br /&gt;// it may be used in this context.&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;$some_var&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;?&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&#39;true&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;:&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;&#39;false&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;// changing the statement around&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; line-height: normal;&quot;&gt;?&amp;gt;&lt;/span&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prog-teach.blogspot.com/feeds/3888098616832114463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prog-teach.blogspot.com/2012/03/echo-function.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/3888098616832114463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/3888098616832114463'/><link rel='alternate' type='text/html' href='http://prog-teach.blogspot.com/2012/03/echo-function.html' title='echo function'/><author><name>Yahya prog</name><uri>http://www.blogger.com/profile/01103381213725850855</uri><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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3v7pOUIJq2SK1qoXSqX0SsfPXtJLwB8cVLavehc0ppVlAIPcjzsDr-2i7ubYwv1Tm-HV2oggSp6Vzvc1HrGohShK8AUa9mS-8RV_m6DLMbKKOPuXNCTQPLk5zrpHONbd9F1c3r8S5z_0/s72-c/php-icone-6255-96.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6179249185834200605.post-3018837406571464484</id><published>2012-03-31T05:53:00.001-07:00</published><updated>2012-03-31T07:46:28.761-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Include Function</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;simpara&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3v7pOUIJq2SK1qoXSqX0SsfPXtJLwB8cVLavehc0ppVlAIPcjzsDr-2i7ubYwv1Tm-HV2oggSp6Vzvc1HrGohShK8AUa9mS-8RV_m6DLMbKKOPuXNCTQPLk5zrpHONbd9F1c3r8S5z_0/s1600/php-icone-6255-96.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3v7pOUIJq2SK1qoXSqX0SsfPXtJLwB8cVLavehc0ppVlAIPcjzsDr-2i7ubYwv1Tm-HV2oggSp6Vzvc1HrGohShK8AUa9mS-8RV_m6DLMbKKOPuXNCTQPLk5zrpHONbd9F1c3r8S5z_0/s1600/php-icone-6255-96.png&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; font-family: verdana, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;background-color: transparent; text-align: left;&quot;&gt;The &lt;/span&gt;&lt;em style=&quot;background-color: transparent; text-align: left;&quot;&gt;include&lt;/em&gt;&lt;span style=&quot;background-color: transparent; text-align: left;&quot;&gt; statement includes and evaluates  the specified file.&lt;/span&gt;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class=&quot;example-contents&quot;&gt;
&lt;div class=&quot;simpara&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;simpara&quot;&gt;
The documentation below also applies to &lt;em&gt;require&lt;/em&gt;. &lt;/div&gt;
&lt;div class=&quot;simpara&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;simpara&quot;&gt;
Files are included based on the file path given or, if none is given, the  include_path specified. If the file  isn&#39;t found in the include_path,  &lt;em&gt;include&lt;/em&gt; will finally check in the calling script&#39;s own  directory and the current working directory before failing. The  &lt;em&gt;include&lt;/em&gt; construct will emit a  warning if  it cannot find a file; this is different behavior from  &lt;em&gt;require&lt;/em&gt;, which will emit a  fatal error. &lt;/div&gt;
&lt;div class=&quot;simpara&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;simpara&quot;&gt;
If a path is defined — whether absolute (starting with a drive letter  or &lt;em&gt;\&lt;/em&gt; on Windows, or &lt;em&gt;/&lt;/em&gt; on Unix/Linux  systems) or relative to the current directory (starting with  &lt;em&gt;.&lt;/em&gt; or &lt;em&gt;..&lt;/em&gt;) — the  include_path will be ignored  altogether.  For example, if a filename begins with &lt;em&gt;../&lt;/em&gt;,  the parser will look in the parent directory to find the requested file. &lt;/div&gt;
&lt;div class=&quot;simpara&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;simpara&quot;&gt;
For more information on how PHP handles including files and the include path,  see the documentation for include_path. &lt;/div&gt;
&lt;div class=&quot;simpara&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;simpara&quot;&gt;
When a file is included, the code it contains inherits the  variable scope of the  line on which the include occurs.  Any variables available at that line  in the calling file will be available within the called file, from that  point forward.  However, all functions and classes defined in the included file have the  global scope. &lt;/div&gt;
&lt;div class=&quot;para&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; id=&quot;example-134&quot;&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;Example #1 Basic &lt;em&gt;include&lt;/em&gt; example&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; font-family: verdana, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;font-family: monospace; font-size: small; text-align: left;&quot;&gt;vars.php&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;br /&gt;$color&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&#39;green&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;$fruit&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&#39;apple&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace; font-size: small; text-align: left;&quot;&gt;test.php&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&quot;A&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;$color&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;$fruit&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;// A&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;include&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&#39;vars.php&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;;&lt;br /&gt;&lt;br /&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&quot;A&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;$color&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;$fruit&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;// A green apple&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;?&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;example-contents&quot;&gt;
&lt;div class=&quot;phpcode&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;simpara&quot;&gt;
If the include occurs inside a function within the calling file,  then all of the code contained in the called file will behave as  though it had been defined inside that function.  So, it will follow  the variable scope of that function.  An exception to this rule are magic constants which are  evaluated by the parser before the include occurs. &lt;/div&gt;
&lt;div class=&quot;simpara&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;para&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; id=&quot;example-135&quot;&gt;
&lt;strong&gt;Example #2 Including within functions&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; font-family: verdana, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;function&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;foo&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;()&lt;br /&gt;{&lt;br /&gt;global&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;$color&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;;&lt;br /&gt;&lt;br /&gt;include&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&#39;vars.php&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;;&lt;br /&gt;&lt;br /&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&quot;A&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;$color&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;$fruit&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;;&lt;br /&gt;}&lt;/span&gt;&lt;span style=&quot;color: #ff8000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;/* vars.php is in the scope of foo() so *&lt;br /&gt;* $fruit is NOT available outside of this *&lt;br /&gt;* scope. $color is because we declared it *&lt;br /&gt;* as global. */&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;foo&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;();&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;// A green apple&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&quot;A&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;$color&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;$fruit&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;// A green&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;?&amp;gt;&lt;/span&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;example-contents&quot;&gt;
&lt;div class=&quot;phpcode&quot;&gt;
&lt;code&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;simpara&quot;&gt;
When a file is included, parsing drops out of PHP mode and  into HTML mode at the beginning of the target file, and resumes  again at the end.  For this reason, any code inside the target  file which should be executed as PHP code must be enclosed within  valid PHP start  and end tags. &lt;/div&gt;
&lt;div class=&quot;simpara&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;simpara&quot;&gt;
If &quot;URL fopen wrappers&quot;  are enabled in PHP (which they are in the default configuration),  you can specify the file to be included using a URL (via HTTP or  other supported wrapper - see Supported Protocols and Wrappers for a list  of protocols) instead of a local pathname.  If the target server interprets  the target file as PHP code, variables may be passed to the included  file using a URL request string as used with HTTP GET.&lt;/div&gt;
&lt;div class=&quot;simpara&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;simpara&quot;&gt;
This is  not strictly speaking the same thing as including the file and having  it inherit the parent file&#39;s variable scope; the script is actually  being run on the remote server and the result is then being  included into the local script. &lt;/div&gt;
&lt;div class=&quot;simpara&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;warning&quot;&gt;
&lt;strong class=&quot;warning&quot;&gt;Warning&lt;/strong&gt;&lt;/div&gt;
&lt;div class=&quot;warning&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;para&quot;&gt;
Windows versions of PHP prior to PHP 4.3.0 do not support access of remote files via this function, even if allow_url_fopen is enabled.&lt;/div&gt;
&lt;div class=&quot;para&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;para&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; id=&quot;example-136&quot;&gt;
&lt;strong&gt;Example #3 &lt;em&gt;include&lt;/em&gt; through HTTP&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; font-family: verdana, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;span style=&quot;color: #ff8000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;/* This example assumes that www.example.com is configured to parse .php&lt;br /&gt;* files and not .txt files. Also, &#39;Works&#39; here means that the variables&lt;br /&gt;* $foo and $bar are available within the included file. */&lt;br /&gt;&lt;br /&gt;// Won&#39;t work; file.txt wasn&#39;t handled by www.example.com as PHP&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;include&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&#39;http://www.example.com/file.txt?foo=1&amp;amp;bar=2&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #ff8000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;// Won&#39;t work; looks for a file named &#39;file.php?foo=1&amp;amp;bar=2&#39; on the&lt;br /&gt;// local filesystem.&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;include&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&#39;file.php?foo=1&amp;amp;bar=2&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #ff8000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;// Works.&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;include&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&#39;http://www.example.com/file.php?foo=1&amp;amp;bar=2&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;$foo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;$bar&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;;&lt;br /&gt;include&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&#39;file.txt&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;// Works.&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;include&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&#39;file.php&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;// Works.&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;?&amp;gt;&lt;/span&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;example-contents&quot;&gt;
&lt;div class=&quot;phpcode&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;phpcode&quot;&gt;
&lt;code&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;warning&quot;&gt;
&lt;strong class=&quot;warning&quot;&gt;Warning&lt;/strong&gt;&lt;/div&gt;
&lt;div class=&quot;warning&quot;&gt;
&lt;h1 class=&quot;title&quot;&gt;

Security warning&lt;/h1&gt;
&lt;div class=&quot;para&quot;&gt;
Remote file may be processed at the remote server (depending on the file   extension and the fact if the remote server runs PHP or not) but it still   has to produce a valid PHP script because it will be processed at the   local server. If the file from the remote server should be processed   there and outputted only, &lt;span class=&quot;function&quot;&gt;readfile()&lt;/span&gt; is much better   function to use. Otherwise, special care should be taken to secure the   remote script to produce a valid and desired code.  &lt;/div&gt;
&lt;div class=&quot;para&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;para&quot;&gt;
See also Remote files,  &lt;span class=&quot;function&quot;&gt;fopen()&lt;/span&gt; and &lt;span class=&quot;function&quot;&gt;file()&lt;/span&gt; for related  information. &lt;/div&gt;
&lt;div class=&quot;simpara&quot;&gt;
Handling Returns: It is possible to execute a &lt;em&gt;return&lt;/em&gt;  statement inside an included file in order to terminate processing in that  file and return to the script which called it.  Also, it&#39;s possible to return  values from included files.  You can take the value of the include call as  you would for a normal function.  This is not, however, possible when including  remote files unless the output of the remote file has  valid PHP start  and end tags (as with any local file).  You can declare the needed  variables within those tags and they will be introduced at whichever point  the file was included. &lt;/div&gt;
&lt;div class=&quot;simpara&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;para&quot;&gt;
Because &lt;em&gt;include&lt;/em&gt; is a special language construct,  parentheses are not needed around its argument. Take care when comparing  return value.  &lt;/div&gt;
&lt;div class=&quot;para&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;example&quot; id=&quot;example-137&quot;&gt;
&lt;strong&gt;Example #4 Comparing return value of include&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; font-family: verdana, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;span style=&quot;color: #ff8000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;// won&#39;t work, evaluated as include((&#39;vars.php&#39;) == &#39;OK&#39;), i.e. include(&#39;&#39;)&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;if (include(&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&#39;vars.php&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;) ==&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&#39;OK&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;) {&lt;br /&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&#39;OK&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;;&lt;br /&gt;}&lt;/span&gt;&lt;span style=&quot;color: #ff8000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;// works&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;if ((include&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&#39;vars.php&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;) ==&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&#39;OK&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;) {&lt;br /&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&#39;OK&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;;&lt;br /&gt;}&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;?&amp;gt;&lt;/span&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;example-contents&quot;&gt;
&lt;div class=&quot;phpcode&quot;&gt;
&lt;code&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;para&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; id=&quot;example-138&quot;&gt;
&lt;strong&gt;Example #5 &lt;em&gt;include&lt;/em&gt; and the &lt;em&gt;return&lt;/em&gt; statement&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; font-family: verdana, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;font-family: monospace; font-size: small; text-align: left;&quot;&gt;return.php&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;br /&gt;$var&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&#39;PHP&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;;&lt;br /&gt;&lt;br /&gt;return&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;$var&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace; font-size: small; text-align: left;&quot;&gt;noreturn.php&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;br /&gt;$var&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&#39;PHP&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace; font-size: small; text-align: left;&quot;&gt;testreturns.php&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;br /&gt;$foo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;= include&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&#39;return.php&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;;&lt;br /&gt;&lt;br /&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;$foo&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;// prints &#39;PHP&#39;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;$bar&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;= include&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&#39;noreturn.php&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;;&lt;br /&gt;&lt;br /&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;$bar&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ff8000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;// prints 1&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;?&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;example-contents&quot;&gt;
&lt;div class=&quot;phpcode&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;phpcode&quot;&gt;
&lt;code&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;simpara&quot;&gt;
&lt;em&gt;$bar&lt;/em&gt; is the value &lt;em&gt;1&lt;/em&gt; because the include  was successful.  Notice the difference between the above examples.  The first uses  &lt;em&gt;return&lt;/em&gt; within the included file while the other does not.  If the file can&#39;t be included, &lt;strong&gt;&lt;code&gt;FALSE&lt;/code&gt;&lt;/strong&gt; is returned and  &lt;strong&gt;&lt;code&gt;E_WARNING&lt;/code&gt;&lt;/strong&gt; is issued. &lt;/div&gt;
&lt;div class=&quot;simpara&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;para&quot;&gt;
If there are functions defined in the included file, they can be used in the  main file independent if they are before &lt;em&gt;return&lt;/em&gt; or after.  If the file is included twice, PHP 5 issues fatal error because functions  were already declared, while PHP 4 doesn&#39;t complain about functions  defined after &lt;em&gt;return&lt;/em&gt;.  It is recommended to use &lt;em&gt;include_once&lt;/em&gt; instead of  checking if the file was already included and conditionally return inside  the included file. &lt;/div&gt;
&lt;div class=&quot;para&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;simpara&quot;&gt;
Another way to &quot;include&quot; a PHP file into a variable is to capture the  output by using the Output Control  Functions with &lt;em&gt;include&lt;/em&gt;. For example: &lt;/div&gt;
&lt;div class=&quot;simpara&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;para&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;example&quot; id=&quot;example-139&quot;&gt;
&lt;strong&gt;Example #6 Using output buffering to include a PHP file into a string&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;example&quot; id=&quot;example-144&quot;&gt;
&lt;blockquote class=&quot;note&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 0); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(0, 0, 0); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 1px; font-family: verdana, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0.5em; padding-left: 1em; padding-right: 1em; padding-top: 0.5em; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&amp;lt;?php&lt;br /&gt;$string&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;get_include_contents&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #dd0000; font-family: monospace; font-size: small; text-align: left;&quot;&gt;&#39;somefile.php&#39;&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;);&lt;br /&gt;&lt;br /&gt;function&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;get_include_contents&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;$filename&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;) {&lt;br /&gt;if (&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;is_file&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;$filename&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;)) {&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;ob_start&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;();&lt;br /&gt;include&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;$filename&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;;&lt;br /&gt;return&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;ob_get_clean&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;();&lt;br /&gt;}&lt;br /&gt;return&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #007700; font-family: monospace; font-size: small; text-align: left;&quot;&gt;;&lt;br /&gt;}&lt;/span&gt;&lt;span style=&quot;color: #0000bb; font-family: monospace; font-size: small; text-align: left;&quot;&gt;?&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;example-contents&quot;&gt;
&lt;div class=&quot;phpcode&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;phpcode&quot;&gt;
&lt;code&gt;&lt;span style=&quot;color: #0000bb;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;para&quot;&gt;
In order to automatically include files within scripts, see also the  auto_prepend_file and  auto_append_file  configuration options in &lt;var class=&quot;filename&quot;&gt;php.ini&lt;/var&gt;.&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prog-teach.blogspot.com/feeds/3018837406571464484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prog-teach.blogspot.com/2012/03/include-function.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/3018837406571464484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/3018837406571464484'/><link rel='alternate' type='text/html' href='http://prog-teach.blogspot.com/2012/03/include-function.html' title='Include Function'/><author><name>Yahya prog</name><uri>http://www.blogger.com/profile/01103381213725850855</uri><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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3v7pOUIJq2SK1qoXSqX0SsfPXtJLwB8cVLavehc0ppVlAIPcjzsDr-2i7ubYwv1Tm-HV2oggSp6Vzvc1HrGohShK8AUa9mS-8RV_m6DLMbKKOPuXNCTQPLk5zrpHONbd9F1c3r8S5z_0/s72-c/php-icone-6255-96.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6179249185834200605.post-3975415336136732551</id><published>2012-03-31T05:40:00.001-07:00</published><updated>2012-03-31T07:46:36.589-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>What is PHP ?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: right;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3v7pOUIJq2SK1qoXSqX0SsfPXtJLwB8cVLavehc0ppVlAIPcjzsDr-2i7ubYwv1Tm-HV2oggSp6Vzvc1HrGohShK8AUa9mS-8RV_m6DLMbKKOPuXNCTQPLk5zrpHONbd9F1c3r8S5z_0/s1600/php-icone-6255-96.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3v7pOUIJq2SK1qoXSqX0SsfPXtJLwB8cVLavehc0ppVlAIPcjzsDr-2i7ubYwv1Tm-HV2oggSp6Vzvc1HrGohShK8AUa9mS-8RV_m6DLMbKKOPuXNCTQPLk5zrpHONbd9F1c3r8S5z_0/s1600/php-icone-6255-96.png&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;br /&gt;
PHP was originally an acronym for &lt;strong&gt;P&lt;/strong&gt;ersonal &lt;strong&gt;H&lt;/strong&gt;ome &lt;strong&gt;P&lt;/strong&gt;ages, but is now a recursive acronym for &lt;strong&gt;P&lt;/strong&gt;HP: &lt;strong&gt;H&lt;/strong&gt;ypertext &lt;strong&gt;P&lt;/strong&gt;reprocessor.&lt;br /&gt;
PHP was originally developed by the Danish Greenlander Rasmus Lerdorf, and was subsequently developed as open source. PHP is not a proper web standard - but an open-source technology. PHP is neither real programming language - but PHP lets you use so-called scripting in your documents.&lt;br /&gt;
To describe what a PHP page is, you could say that it is a file with the extension &lt;strong&gt;.php&lt;/strong&gt; that contains a combination of HTML tags and scripts that run on a web server. &lt;br /&gt;
&lt;h2&gt;

How does PHP work?&lt;/h2&gt;
The best way to explain how PHP works is by comparing it with standard HTML. Imagine you type the address of an HTML document (e.g.&amp;nbsp;
http://prog-teach.blogspot.com/&amp;nbsp;) in the address line of the browser. This way you &lt;strong&gt;request&lt;/strong&gt; an HTML page. It could be illustrated like this:&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;/div&gt;
As you can see, the server simply sends an HTML file to the client. But if you instead type&amp;nbsp;
http://prog-teach.blogspot.com/&amp;nbsp;&amp;nbsp;- and thus request an &lt;strong&gt;PHP page&lt;/strong&gt; - the server is put to work .&lt;br /&gt;
&lt;br /&gt;
The server first reads the PHP file carefully to see if there are any tasks that need to be executed. Only when the server has done what it is supposed to do, the result is then sent to the client. It is important to understand that the client only sees the &lt;strong&gt;result&lt;/strong&gt; of the server&#39;s work, not the actual instructions.&lt;br /&gt;
This means that if you click &quot;view source&quot; on a PHP page, you do not see the PHP codes - only basic HTML tags. Therefore, you cannot see how a PHP page is made by using &quot;view source&quot;. You have to learn PHP in other ways, for example, by reading this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;What you learn in this tutorial is to write commands to a server!&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
So, the first thing you need to get ahold of is... a server! But don&#39;t worry - you don&#39;t need to buy a new computer. You just need to install some software on your computer that makes it function as a server. Another option is to have a website on a hosted server that supports PHP. Then you just need to be online while coding.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prog-teach.blogspot.com/feeds/3975415336136732551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prog-teach.blogspot.com/2012/03/what-is-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/3975415336136732551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/3975415336136732551'/><link rel='alternate' type='text/html' href='http://prog-teach.blogspot.com/2012/03/what-is-php.html' title='What is PHP ?'/><author><name>Yahya prog</name><uri>http://www.blogger.com/profile/01103381213725850855</uri><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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3v7pOUIJq2SK1qoXSqX0SsfPXtJLwB8cVLavehc0ppVlAIPcjzsDr-2i7ubYwv1Tm-HV2oggSp6Vzvc1HrGohShK8AUa9mS-8RV_m6DLMbKKOPuXNCTQPLk5zrpHONbd9F1c3r8S5z_0/s72-c/php-icone-6255-96.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6179249185834200605.post-7795692074804819413</id><published>2012-03-31T05:32:00.002-07:00</published><updated>2012-03-31T07:46:12.620-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>Your first step in PHP , Introduction</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3v7pOUIJq2SK1qoXSqX0SsfPXtJLwB8cVLavehc0ppVlAIPcjzsDr-2i7ubYwv1Tm-HV2oggSp6Vzvc1HrGohShK8AUa9mS-8RV_m6DLMbKKOPuXNCTQPLk5zrpHONbd9F1c3r8S5z_0/s1600/php-icone-6255-96.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3v7pOUIJq2SK1qoXSqX0SsfPXtJLwB8cVLavehc0ppVlAIPcjzsDr-2i7ubYwv1Tm-HV2oggSp6Vzvc1HrGohShK8AUa9mS-8RV_m6DLMbKKOPuXNCTQPLk5zrpHONbd9F1c3r8S5z_0/s1600/php-icone-6255-96.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;a href=&quot;http://prog-teach.blogspot.com/&quot;&gt;PHP&lt;/a&gt; gives you the freedom to add advanced features to your website.&lt;br /&gt;
The aim of this tutorial is to give you an easy, yet thorough and accurate introduction to PHP. It starts from scratch but requires that you already have a good knowledge of&lt;a href=&quot;http://prog-teach.blogspot.com/&quot;&gt; HTML&lt;/a&gt;. If you are new to HTML, you should start with Us .&lt;br /&gt;
PHP can be used in many contexts - discussion forums, polls, shops, SMS gateways, mailing lists, etc. The only limitation with what you choose to do with PHP is your imagination. PHP is not hard to learn, but be aware that PHP is more sophisticated and demanding to learn than HTML. Therefore, patience in the process is a virtue.&lt;br /&gt;
This tutorial cannot show you everything. Therefore, some engagement and a will to experiment are required. If you need help along the &lt;a href=&quot;http://prog-teach.blogspot.com/&quot;&gt;way&lt;/a&gt;&amp;nbsp;. This is where you meet the real experts who are willing and ready to offer tips, suggestions and advice. &lt;br /&gt;
&lt;h2&gt;



What is needed?&lt;/h2&gt;
It is assumed that you already have a text editor and know how it is used.&lt;br /&gt;
Next, you need access to a computer or a server that can run PHP. In contrast to HTML and CSS, PHP is &lt;strong&gt;not&lt;/strong&gt; affected by which browser your visitors use, but by the type of server that&#39;s hosting your pages. This is because &lt;a href=&quot;http://prog-teach.blogspot.com/&quot;&gt;PHP&lt;/a&gt; is a &lt;strong&gt;server-side&lt;/strong&gt; technology.&lt;br /&gt;
In the next few lessons, you will learn all about how PHP works, and how to set up your computer to run PHP. After that, you&#39;ll learn about specific functions and methods.&lt;br /&gt;
When you finish this tutorial, you will be able to code PHP and thus have access to unlimited possibilities for adding interactivity to your webpages.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prog-teach.blogspot.com/feeds/7795692074804819413/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prog-teach.blogspot.com/2012/03/your-first-step-in-php-introduction.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/7795692074804819413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/7795692074804819413'/><link rel='alternate' type='text/html' href='http://prog-teach.blogspot.com/2012/03/your-first-step-in-php-introduction.html' title='Your first step in PHP , Introduction'/><author><name>Yahya prog</name><uri>http://www.blogger.com/profile/01103381213725850855</uri><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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3v7pOUIJq2SK1qoXSqX0SsfPXtJLwB8cVLavehc0ppVlAIPcjzsDr-2i7ubYwv1Tm-HV2oggSp6Vzvc1HrGohShK8AUa9mS-8RV_m6DLMbKKOPuXNCTQPLk5zrpHONbd9F1c3r8S5z_0/s72-c/php-icone-6255-96.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6179249185834200605.post-6771378086478602121</id><published>2012-03-31T05:26:00.001-07:00</published><updated>2012-03-31T05:29:11.416-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HTML"/><title type='text'>Links In HTML</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlYysoJ68cDaFkFFusB9mtzqjKAS0ITM8U3hrVz3iZ5rhBGVoZJOVmKSq5U5v9bJjALnLPtr1Fe84oiVBHAbjUrQba-VgsoGut0cXbj1SF3VYkUmuF8Dc6oGWvct-anZKB4_zFspgK1iM/s1600/imgres.jpg&quot; imageanchor=&quot;1&quot; style=&quot;background-color: #f7f7f7; color: #0177c6; font-family: Arial, Verdana, Tahoma; font-size: 12px; line-height: 20px; margin-left: 1em; margin-right: 1em; outline-color: initial; outline-style: none; outline-width: initial; text-align: center; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlYysoJ68cDaFkFFusB9mtzqjKAS0ITM8U3hrVz3iZ5rhBGVoZJOVmKSq5U5v9bJjALnLPtr1Fe84oiVBHAbjUrQba-VgsoGut0cXbj1SF3VYkUmuF8Dc6oGWvct-anZKB4_zFspgK1iM/s200/imgres.jpg&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: solid; border-color: initial; border-color: initial; border-image: initial; border-left-style: solid; border-right-style: solid; border-top-style: solid; border-width: initial; border-width: initial; margin-bottom: 0px; margin-left: 1px; margin-right: 5px; margin-top: 1px; max-width: 650px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px;&quot;&gt;&amp;nbsp;&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
To make links, you use what you always use when coding HTML: an element. &lt;strong&gt;A simple element with one attribute and you will be able to link to anything and everything&lt;/strong&gt;. Here is an example of what a link to&amp;nbsp;
prog-teach.blogspot.com&amp;nbsp;&amp;nbsp;could look like:&lt;br /&gt;
&lt;h3&gt;


Example 1:&lt;/h3&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;pre&gt;&lt;div class=&quot;codebox&quot; style=&quot;background-color: white; border-bottom-color: gray; border-bottom-style: dotted; border-bottom-width: 2px; border-image: initial; border-left-color: gray; border-left-style: dotted; border-left-width: 2px; border-right-color: gray; border-right-style: dotted; border-right-width: 2px; border-top-color: gray; border-top-style: dotted; border-top-width: 2px; color: maroon; font-family: sans-serif, &#39;trebuchet ms&#39;, &#39;lucida grande&#39;, &#39;lucida sans unicode&#39;, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 1em; padding-bottom: 0em; padding-left: 1em; padding-right: 1em; padding-top: 0em; text-align: -webkit-auto; white-space: normal;&quot;&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;&lt;a href=&quot;http://prog-teach.blogspot.com/&quot;&gt;http://prog-teach.blogspot.com/&lt;/a&gt;&quot;&amp;gt;Here is a link to HTML&lt;/code&gt;&lt;span style=&quot;font-family: sans-serif, &#39;trebuchet ms&#39;, &#39;lucida grande&#39;, &#39;lucida sans unicode&#39;, arial, helvetica, sans-serif; white-space: normal;&quot;&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;code&gt; &lt;/code&gt;
 &lt;/pre&gt;
&lt;/div&gt;
Would look like this in the browser:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;examplebox&quot;&gt;
&lt;a href=&quot;http://prog-teach.blogspot.com/&quot;&gt;Here is a link to HTML&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;examplebox&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
The element &lt;code&gt;a&lt;/code&gt; stands for &quot;anchor&quot;. And the attribute &lt;code&gt;href&lt;/code&gt; is short for &quot;hypertext reference&quot;, which specifies where the link leads to - typically an address on the internet or a file name.&lt;br /&gt;
In the above example the attribute &lt;code&gt;href&lt;/code&gt; has the value &quot;&amp;nbsp;http://prog-teach.blogspot.com&amp;nbsp;&quot;, which is the full address of&amp;nbsp;
prog-teach.blogspot.com&amp;nbsp;&amp;nbsp;and is called a URL (Uniform Resource Locator). Note that &quot;http://&quot; must always be included in URLs. The sentence &quot;Here is a link to&amp;nbsp;
prog-teach.blogspot.com&amp;nbsp;&quot; is the text that is shown in the browser as the link. Remember to close the element with an &lt;code&gt;&amp;lt;/a&amp;gt;&lt;/code&gt;.&lt;br /&gt;
&lt;h2&gt;


What about links between my own pages?&lt;/h2&gt;
If you want to make a link between pages on the same website, you do not need to spell out the entire address (URL) for the document.  For example, if you have made two pages (let us call them page1.htm and page2.htm) and saved them in the same folder you can make a link from one page to the other by only typing the name of the file in the link. Under such circumstances a link from page1.htm to page2.htm could look like this:&lt;br /&gt;
&lt;h3&gt;


Example 2:&lt;/h3&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;pre&gt; &lt;code&gt;&lt;pre&gt;&lt;div class=&quot;codebox&quot; style=&quot;background-color: white; border-bottom-color: gray; border-bottom-style: dotted; border-bottom-width: 2px; border-image: initial; border-left-color: gray; border-left-style: dotted; border-left-width: 2px; border-right-color: gray; border-right-style: dotted; border-right-width: 2px; border-top-color: gray; border-top-style: dotted; border-top-width: 2px; font-size: 14px; margin-bottom: 1em; padding-bottom: 0em; padding-left: 1em; padding-right: 1em; padding-top: 0em; text-align: -webkit-auto;&quot;&gt;
&lt;pre style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;text-align: left;&quot;&gt;&amp;lt;a href=&quot;page2.htm&quot;&amp;gt;Click here to go to page 2&amp;lt;/a&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;text-align: left;&quot;&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;/code&gt;&lt;code&gt; &lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
If page 2 were placed in a subfolder (named &quot;subfolder&quot;), the link could look like this:&lt;br /&gt;
&lt;h3&gt;


Example 3:&lt;/h3&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;pre&gt; 
&lt;pre&gt;&lt;div class=&quot;codebox&quot; style=&quot;background-color: white; border-bottom-color: gray; border-bottom-style: dotted; border-bottom-width: 2px; border-image: initial; border-left-color: gray; border-left-style: dotted; border-left-width: 2px; border-right-color: gray; border-right-style: dotted; border-right-width: 2px; border-top-color: gray; border-top-style: dotted; border-top-width: 2px; margin-bottom: 1em; padding-bottom: 0em; padding-left: 1em; padding-right: 1em; padding-top: 0em; text-align: -webkit-auto;&quot;&gt;
&lt;pre style=&quot;color: maroon; font-family: sans-serif, &#39;trebuchet ms&#39;, &#39;lucida grande&#39;, &#39;lucida sans unicode&#39;, arial, helvetica, sans-serif; font-size: 14px; white-space: normal;&quot;&gt; &lt;code&gt;
&lt;span style=&quot;color: black; font-family: sans-serif, &#39;trebuchet ms&#39;, &#39;lucida grande&#39;, &#39;lucida sans unicode&#39;, arial, helvetica, sans-serif; text-align: left; white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;div style=&quot;font-size: 14px; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;text-align: left;&quot;&gt;&amp;lt;a&lt;/span&gt;&lt;span style=&quot;text-align: left;&quot;&gt; href=&quot;subfolder/page2.htm&quot;&amp;gt;Click here to go to page 2&amp;lt;/a&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;/pre&gt;
&lt;/div&gt;
The other way around, a link from page 2 (in the subfolder) to page 1 would look like this:&lt;br /&gt;
&lt;h3&gt;


Example 4:&lt;/h3&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;pre&gt; 
&lt;pre&gt;&lt;div class=&quot;codebox&quot; style=&quot;background-color: white; border-bottom-color: gray; border-bottom-style: dotted; border-bottom-width: 2px; border-image: initial; border-left-color: gray; border-left-style: dotted; border-left-width: 2px; border-right-color: gray; border-right-style: dotted; border-right-width: 2px; border-top-color: gray; border-top-style: dotted; border-top-width: 2px; color: maroon; font-family: sans-serif, &#39;trebuchet ms&#39;, &#39;lucida grande&#39;, &#39;lucida sans unicode&#39;, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 1em; padding-bottom: 0em; padding-left: 1em; padding-right: 1em; padding-top: 0em; text-align: -webkit-auto; white-space: normal;&quot;&gt;
&lt;pre&gt;&lt;pre style=&quot;color: black; text-align: left;&quot;&gt;&lt;code&gt;&amp;lt;a href=&quot;../page1.htm&quot;&amp;gt;A link to page 1&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;/pre&gt;
&lt;/div&gt;
&quot;../&quot; points to the folder one level up from position of the file from which the link is made. Following the same system, you can also point two (or more) folders up by writing &quot;../../&quot;.&lt;br /&gt;
Did you understand the system? Alternatively, you can always type the complete address for the file (URL).&lt;br /&gt;
&lt;h2&gt;


What about internal links within a page?&lt;/h2&gt;
You can also create internal links within a page - for example a table of contents at the top with links to each chapter below. All you need to use is a very useful attribute called &lt;code&gt;id&lt;/code&gt; (identification) and the symbol &quot;#&quot;.&lt;br /&gt;
Use the &lt;code&gt;id&lt;/code&gt; attribute to mark the element to which you want to link. For example:&lt;br /&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;pre&gt; 
&lt;pre&gt;&lt;div class=&quot;codebox&quot; style=&quot;background-color: white; border-bottom-color: gray; border-bottom-style: dotted; border-bottom-width: 2px; border-image: initial; border-left-color: gray; border-left-style: dotted; border-left-width: 2px; border-right-color: gray; border-right-style: dotted; border-right-width: 2px; border-top-color: gray; border-top-style: dotted; border-top-width: 2px; color: maroon; font-family: sans-serif, &#39;trebuchet ms&#39;, &#39;lucida grande&#39;, &#39;lucida sans unicode&#39;, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 1em; padding-bottom: 0em; padding-left: 1em; padding-right: 1em; padding-top: 0em; text-align: -webkit-auto; white-space: normal;&quot;&gt;
&lt;pre&gt;&lt;pre style=&quot;color: black; text-align: left;&quot;&gt;&lt;code&gt;&amp;lt;h1 id=&quot;heading1&quot;&amp;gt;heading 1&amp;lt;/h1&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;/pre&gt;
&lt;/div&gt;
You can now create a link to that element by using &quot;#&quot; in the link attribute. The &quot;#&quot; must be followed by the &lt;code&gt;id&lt;/code&gt; of the tag you want to link to. For example:&lt;br /&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;pre&gt; 
&lt;pre&gt;&lt;div class=&quot;codebox&quot; style=&quot;background-color: white; border-bottom-color: gray; border-bottom-style: dotted; border-bottom-width: 2px; border-image: initial; border-left-color: gray; border-left-style: dotted; border-left-width: 2px; border-right-color: gray; border-right-style: dotted; border-right-width: 2px; border-top-color: gray; border-top-style: dotted; border-top-width: 2px; color: maroon; font-family: sans-serif, &#39;trebuchet ms&#39;, &#39;lucida grande&#39;, &#39;lucida sans unicode&#39;, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 1em; padding-bottom: 0em; padding-left: 1em; padding-right: 1em; padding-top: 0em; text-align: -webkit-auto; white-space: normal;&quot;&gt;
&lt;pre&gt;&lt;pre style=&quot;color: black; text-align: left;&quot;&gt;&lt;code&gt;&amp;lt;a href=&quot;#heading1&quot;&amp;gt;Link to heading 1&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;/pre&gt;
&lt;/div&gt;
All will become clear with an example:&lt;br /&gt;
&lt;h3&gt;


Example 5:&lt;/h3&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;pre&gt; &lt;pre&gt;&lt;div class=&quot;codebox&quot; style=&quot;background-color: white; border-bottom-color: gray; border-bottom-style: dotted; border-bottom-width: 2px; border-image: initial; border-left-color: gray; border-left-style: dotted; border-left-width: 2px; border-right-color: gray; border-right-style: dotted; border-right-width: 2px; border-top-color: gray; border-top-style: dotted; border-top-width: 2px; color: maroon; font-family: sans-serif, &#39;trebuchet ms&#39;, &#39;lucida grande&#39;, &#39;lucida sans unicode&#39;, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 1em; padding-bottom: 0em; padding-left: 1em; padding-right: 1em; padding-top: 0em; text-align: -webkit-auto; white-space: normal;&quot;&gt;
&lt;pre&gt;&lt;span style=&quot;background-color: white; color: black; font-family: sans-serif, &#39;trebuchet ms&#39;, &#39;lucida grande&#39;, &#39;lucida sans unicode&#39;, arial, helvetica, sans-serif; text-align: left; white-space: normal;&quot;&gt;&amp;lt;html&amp;gt;&lt;/span&gt;&lt;pre style=&quot;color: black; text-align: left;&quot;&gt;&lt;code&gt;   
   &amp;lt;head&amp;gt;
   &amp;lt;/head&amp;gt;

   &amp;lt;body&amp;gt;

  &amp;lt;p&amp;gt;&amp;lt;a href=&quot;#heading1&quot;&amp;gt;Link to heading 1&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
  &amp;lt;p&amp;gt;&amp;lt;a href=&quot;#heading2&quot;&amp;gt;Link to heading 2&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;

  &amp;lt;h1 id=&quot;heading1&quot;&amp;gt;heading 1&amp;lt;/h1&amp;gt;
  &amp;lt;p&amp;gt;Text text text text&amp;lt;/p&amp;gt;

  &amp;lt;h1 id=&quot;heading2&quot;&amp;gt;heading 2&amp;lt;/h1&amp;gt;
  &amp;lt;p&amp;gt;Text text text text&amp;lt;/p&amp;gt;
   
   &amp;lt;/body&amp;gt;

 &amp;lt;/html&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;/div&gt;
will look like this in the browser (click on the two links):&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;div class=&quot;codebox&quot; style=&quot;background-color: white; border-bottom-color: gray; border-bottom-style: dotted; border-bottom-width: 2px; border-image: initial; border-left-color: gray; border-left-style: dotted; border-left-width: 2px; border-right-color: gray; border-right-style: dotted; border-right-width: 2px; border-top-color: gray; border-top-style: dotted; border-top-width: 2px; color: maroon; font-family: sans-serif, &#39;trebuchet ms&#39;, &#39;lucida grande&#39;, &#39;lucida sans unicode&#39;, arial, helvetica, sans-serif; margin-bottom: 1em; padding-bottom: 0em; padding-left: 1em; padding-right: 1em; padding-top: 0em; text-align: -webkit-auto; white-space: normal;&quot;&gt;
&lt;pre style=&quot;font-size: 14px;&quot;&gt;&lt;a href=&quot;http://prog-teach.blogspot.com/&quot; style=&quot;background-color: white; font-family: &#39;Times New Roman&#39;; font-size: medium; text-align: left; white-space: normal;&quot;&gt;Link to heading 1&lt;/a&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;div class=&quot;examplebox&quot; style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; text-align: left; white-space: normal;&quot;&gt;
&lt;a href=&quot;http://prog-teach.blogspot.com/&quot;&gt;Link to heading 2&lt;/a&gt;&lt;br /&gt;
&lt;h1 id=&quot;heading1&quot;&gt;


Heading 1&lt;/h1&gt;
Text text text text&lt;br /&gt;
&lt;h1 id=&quot;heading2&quot;&gt;


Heading 2&lt;/h1&gt;
Text text text text&lt;/div&gt;
&lt;span style=&quot;font-size: 14px;&quot;&gt;
&lt;/span&gt;&lt;div style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; text-align: left; white-space: normal;&quot;&gt;
(Note: An id attribut must start with a letter)&lt;/div&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;h1&gt;


Can I link to anything else?&lt;/h1&gt;
You can also make a link to an e-mail address.  It is done in almost the same way as when you link to a document:&lt;br /&gt;
&lt;h3&gt;


Example 6:&lt;/h3&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;pre&gt; 
&lt;pre&gt;&lt;div class=&quot;codebox&quot; style=&quot;background-color: white; border-bottom-color: gray; border-bottom-style: dotted; border-bottom-width: 2px; border-image: initial; border-left-color: gray; border-left-style: dotted; border-left-width: 2px; border-right-color: gray; border-right-style: dotted; border-right-width: 2px; border-top-color: gray; border-top-style: dotted; border-top-width: 2px; color: maroon; font-family: sans-serif, &#39;trebuchet ms&#39;, &#39;lucida grande&#39;, &#39;lucida sans unicode&#39;, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 1em; padding-bottom: 0em; padding-left: 1em; padding-right: 1em; padding-top: 0em; text-align: -webkit-auto; white-space: normal;&quot;&gt;
&lt;pre&gt;&lt;pre style=&quot;color: black; text-align: left;&quot;&gt;&lt;code&gt;&amp;lt;a href=&quot;mailto:nobody@prog-teach.blogspot.com/&quot;&amp;gt;Send an e-mail to nobody at 
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: small; white-space: normal;&quot;&gt;prog-teach.blogspot.com&lt;/span&gt;&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;code&gt; &lt;/code&gt;
 &lt;/pre&gt;
&lt;/div&gt;
will look like this in the browser:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;div class=&quot;codebox&quot; style=&quot;background-color: white; border-bottom-color: gray; border-bottom-style: dotted; border-bottom-width: 2px; border-image: initial; border-left-color: gray; border-left-style: dotted; border-left-width: 2px; border-right-color: gray; border-right-style: dotted; border-right-width: 2px; border-top-color: gray; border-top-style: dotted; border-top-width: 2px; color: maroon; font-family: sans-serif, &#39;trebuchet ms&#39;, &#39;lucida grande&#39;, &#39;lucida sans unicode&#39;, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 1em; padding-bottom: 0em; padding-left: 1em; padding-right: 1em; padding-top: 0em; text-align: -webkit-auto; white-space: normal;&quot;&gt;
&lt;pre&gt;&lt;a href=&quot;mailto:nobody@prog-teach.blogspot.com&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium; text-align: left; white-space: normal;&quot;&gt;Send an e-mail to nobody at HTML&lt;/a&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/pre&gt;
The only difference between a link to an e-mail and a link to a file is that instead of typing the address of a document, you type &lt;code&gt;mailto:&lt;/code&gt; followed by an e-mail address. When the link is clicked, the default e-mail program opens with a new blank message addressed to the specified e-mail address. Please note that this function will only work if there is an e-mail program installed on your computer. Give it a try!&lt;br /&gt;
&lt;h2&gt;


Are there any other attributes I should know of?&lt;/h2&gt;
To create a link, you always have to use the &lt;code&gt;href&lt;/code&gt; attribute. In addition, you can also put a &lt;code&gt;title&lt;/code&gt; on your link:&lt;br /&gt;
&lt;h3&gt;


Example 7:&lt;/h3&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;pre&gt; &lt;span style=&quot;background-color: white; color: maroon; font-family: sans-serif, &#39;trebuchet ms&#39;, &#39;lucida grande&#39;, &#39;lucida sans unicode&#39;, arial, helvetica, sans-serif; font-size: 14px; text-align: -webkit-auto; white-space: normal;&quot;&gt;&lt;/span&gt;&lt;pre&gt;&lt;div class=&quot;codebox&quot; style=&quot;background-color: white; border-bottom-color: gray; border-bottom-style: dotted; border-bottom-width: 2px; border-image: initial; border-left-color: gray; border-left-style: dotted; border-left-width: 2px; border-right-color: gray; border-right-style: dotted; border-right-width: 2px; border-top-color: gray; border-top-style: dotted; border-top-width: 2px; color: maroon; font-family: sans-serif, &#39;trebuchet ms&#39;, &#39;lucida grande&#39;, &#39;lucida sans unicode&#39;, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 1em; padding-bottom: 0em; padding-left: 1em; padding-right: 1em; padding-top: 0em; text-align: -webkit-auto; white-space: normal;&quot;&gt;
&lt;pre&gt;&lt;pre style=&quot;color: black; text-align: left;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: sans-serif, &#39;trebuchet ms&#39;, &#39;lucida grande&#39;, &#39;lucida sans unicode&#39;, arial, helvetica, sans-serif; white-space: normal;&quot;&gt;&amp;lt;a href=&quot;http://prog-teach.blogspot.com/&quot; title=&quot;Visit prog-teach.blogspot.com/ and learn HTML&quot;&amp;gt;Learn Programmation&amp;lt;/a&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;code&gt;
 &lt;/code&gt;
 &lt;/pre&gt;
&lt;/div&gt;
Would look like this in the browser:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;div class=&quot;codebox&quot; style=&quot;background-color: white; border-bottom-color: gray; border-bottom-style: dotted; border-bottom-width: 2px; border-image: initial; border-left-color: gray; border-left-style: dotted; border-left-width: 2px; border-right-color: gray; border-right-style: dotted; border-right-width: 2px; border-top-color: gray; border-top-style: dotted; border-top-width: 2px; color: maroon; font-family: sans-serif, &#39;trebuchet ms&#39;, &#39;lucida grande&#39;, &#39;lucida sans unicode&#39;, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 1em; padding-bottom: 0em; padding-left: 1em; padding-right: 1em; padding-top: 0em; text-align: -webkit-auto; white-space: normal;&quot;&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;a href=&quot;http://prog-teach.blogspot.com/&quot;&gt;Learn Programmation&lt;/a&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div class=&quot;examplebox&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
The title attribute is used to type a short description of the link. If you - without clicking - place the cursor over the link, you will see the text &quot;Visit prog-teach.blogspot.com/ and learn HTML&quot; appears.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prog-teach.blogspot.com/feeds/6771378086478602121/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prog-teach.blogspot.com/2012/03/links-in-html.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/6771378086478602121'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/6771378086478602121'/><link rel='alternate' type='text/html' href='http://prog-teach.blogspot.com/2012/03/links-in-html.html' title='Links In HTML'/><author><name>Yahya prog</name><uri>http://www.blogger.com/profile/01103381213725850855</uri><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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlYysoJ68cDaFkFFusB9mtzqjKAS0ITM8U3hrVz3iZ5rhBGVoZJOVmKSq5U5v9bJjALnLPtr1Fe84oiVBHAbjUrQba-VgsoGut0cXbj1SF3VYkUmuF8Dc6oGWvct-anZKB4_zFspgK1iM/s72-c/imgres.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6179249185834200605.post-8609469174737499415</id><published>2012-03-31T04:53:00.000-07:00</published><updated>2012-03-31T04:54:39.658-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HTML"/><title type='text'>Show Images In HTML</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
All you need do is first tell the browser that you want to insert an image (&lt;code&gt;img&lt;/code&gt;) and then where it is located (&lt;code&gt;src&lt;/code&gt;, short for &quot;source&quot;). Do you get the picture?&lt;br /&gt;
&lt;br /&gt;
Notice how the &lt;code&gt;img&lt;/code&gt; element is opened and closed using the same tag. Like the &lt;code&gt;&amp;lt;br /&amp;gt;&lt;/code&gt; tag, it is not tied to a piece of text.&lt;br /&gt;
&lt;br /&gt;
&quot;david.jpg&quot; is the name of the image file you want to insert in your page. &quot;.jpg&quot; is the file type of the image. Just like the extension &quot;.htm&quot; shows that a file is an HTML document, &quot;.jpg&quot; tells the browser that a file is a picture. There are three different types of image file types you can insert into your pages:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;GIF (Graphics Interchange Format)&lt;/li&gt;
&lt;li&gt;JPG / JPEG (Joint Photographic Experts Group)&lt;/li&gt;
&lt;li&gt;PNG (Portable Network Graphics) &lt;/li&gt;
&lt;/ul&gt;
&lt;strong&gt;GIF images are usually best for graphics and drawings, while JPEG images are usually better for photographs&lt;/strong&gt;. This is for two reasons: first, GIF images only consist of 256 colours, while JPEG images comprise of millions of colours and second, the GIF format is better at compressing simple images, than the JPEG format which is optimized for more complex images. The better the compression, the smaller the size of the image file, the faster your page will load. As you probably know from your own experience, unnecessarily &#39;heavy&#39; pages can be extremely annoying for the user.&lt;br /&gt;
Traditionally, the GIF and JPEG formats have been the two dominant image types, but lately, the PNG format has become more and more popular (primarily at the expense of the GIF format). &lt;strong&gt;The PNG format contains in many ways the best of both the JPEG and GIF format: millions of colours and effective compressing&lt;/strong&gt;.&lt;br /&gt;
&lt;h2&gt;

Where do I get my images from?&lt;/h2&gt;
To make your own images, you need an image editing program. &lt;strong&gt;An image editing program is one of the most essential tools you need to create beautiful websites&lt;/strong&gt;.&lt;br /&gt;
Unfortunately, no good image editing programs comes with Windows or other operating systems. Thus, you might consider investing in either Paint Shop Pro, PhotoShop or Macromedia Fireworks, which are three of the best image editing programs currently on the market.&lt;br /&gt;
However, as we said before, it will not be necessary to buy expensive programs to complete this tutorial. For now, you can download the excellent image editing program IrfanView which is so-called freeware and therefore costs nothing.&lt;br /&gt;
Or you can just borrow images from other sites by downloading them. But please be careful not to violate copyrights when downloading pictures. Still, it&#39;s useful to know how to download pictures, so here&#39;s how you do it:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Right-click on an image on any image on the Internet.&lt;/li&gt;
&lt;li&gt;Choose &quot;Save picture as...&quot; in the menu that appears.&lt;/li&gt;
&lt;li&gt;Choose a location for the image on your computer and press &quot;Save&quot;.&lt;/li&gt;
&lt;/ol&gt;
Do this with the image below and save it on your computer at the same location as your HTML documents. (Notice that the logo is saved as a PNG file: logo.png):&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlYysoJ68cDaFkFFusB9mtzqjKAS0ITM8U3hrVz3iZ5rhBGVoZJOVmKSq5U5v9bJjALnLPtr1Fe84oiVBHAbjUrQba-VgsoGut0cXbj1SF3VYkUmuF8Dc6oGWvct-anZKB4_zFspgK1iM/s1600/imgres.jpg&quot; imageanchor=&quot;1&quot; style=&quot;background-color: #f7f7f7; color: #0177c6; font-family: Arial, Verdana, Tahoma; font-size: 12px; line-height: 20px; margin-left: 1em; margin-right: 1em; outline-color: initial; outline-style: none; outline-width: initial; text-align: center; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlYysoJ68cDaFkFFusB9mtzqjKAS0ITM8U3hrVz3iZ5rhBGVoZJOVmKSq5U5v9bJjALnLPtr1Fe84oiVBHAbjUrQba-VgsoGut0cXbj1SF3VYkUmuF8Dc6oGWvct-anZKB4_zFspgK1iM/s200/imgres.jpg&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-style: solid; border-color: initial; border-image: initial; border-left-style: solid; border-right-style: solid; border-top-style: solid; border-width: initial; margin-bottom: 0px; margin-left: 1px; margin-right: 5px; margin-top: 1px; max-width: 650px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;background-color: white; color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px;&quot;&gt;&amp;nbsp;&lt;/span&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can insert the image into one of your own pages. Try it yourself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; font-family: sans-serif, &#39;trebuchet ms&#39;, &#39;lucida grande&#39;, &#39;lucida sans unicode&#39;, arial, helvetica, sans-serif; font-size: 14px; text-align: -webkit-auto;&quot;&gt;
&lt;strong&gt;Example 1:&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div class=&quot;codebox&quot; style=&quot;background-color: white; border-bottom-color: gray; border-bottom-style: dotted; border-bottom-width: 2px; border-image: initial; border-left-color: gray; border-left-style: dotted; border-left-width: 2px; border-right-color: gray; border-right-style: dotted; border-right-width: 2px; border-top-color: gray; border-top-style: dotted; border-top-width: 2px; color: maroon; font-family: sans-serif, &#39;trebuchet ms&#39;, &#39;lucida grande&#39;, &#39;lucida sans unicode&#39;, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 1em; padding-bottom: 0em; padding-left: 1em; padding-right: 1em; padding-top: 0em; text-align: -webkit-auto;&quot;&gt;
&lt;pre&gt; &lt;code&gt;
&amp;lt;img src=&quot;david.jpg&quot; alt=&quot;David&quot; /&amp;gt;
 &lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: sans-serif, &#39;trebuchet ms&#39;, &#39;lucida grande&#39;, &#39;lucida sans unicode&#39;, arial, helvetica, sans-serif; font-size: 14px; text-align: -webkit-auto;&quot;&gt;
would look like this in the browser:&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;examplebox&quot; style=&quot;background-color: white; border-bottom-color: gray; border-bottom-style: dotted; border-bottom-width: 2px; border-image: initial; border-left-color: gray; border-left-style: dotted; border-left-width: 2px; border-right-color: gray; border-right-style: dotted; border-right-width: 2px; border-top-color: gray; border-top-style: dotted; border-top-width: 2px; font-family: sans-serif, &#39;trebuchet ms&#39;, &#39;lucida grande&#39;, &#39;lucida sans unicode&#39;, arial, helvetica, sans-serif; font-size: 14px; margin-bottom: 1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em; text-align: -webkit-auto;&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;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwe0ydo8xwrIm6DbEYHW3Wq6gk6iIjL17YutFzIcCfqbe4fOS_Frlov4sh20SC2FKojQSrtRVxLzgJ4A3351W61is1fgRUvf3cMIsmJgUkvegs5Mmvmt50JX2hgjdHPu0YQctPHRnA8XE/s1600/david%5B1%5D.jpg&quot; imageanchor=&quot;1&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium; margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwe0ydo8xwrIm6DbEYHW3Wq6gk6iIjL17YutFzIcCfqbe4fOS_Frlov4sh20SC2FKojQSrtRVxLzgJ4A3351W61is1fgRUvf3cMIsmJgUkvegs5Mmvmt50JX2hgjdHPu0YQctPHRnA8XE/s1600/david%5B1%5D.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: sans-serif, &#39;trebuchet ms&#39;, &#39;lucida grande&#39;, &#39;lucida sans unicode&#39;, arial, helvetica, sans-serif; font-size: 14px; text-align: -webkit-auto;&quot;&gt;
All you need do is first tell the browser that you want to insert an image (&lt;code&gt;img&lt;/code&gt;) and then where it is located (&lt;code&gt;src&lt;/code&gt;, short for &quot;source&quot;). Do you&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: sans-serif, &#39;trebuchet ms&#39;, &#39;lucida grande&#39;, &#39;lucida sans unicode&#39;, arial, helvetica, sans-serif; font-size: 14px; text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: sans-serif, &#39;trebuchet ms&#39;, &#39;lucida grande&#39;, &#39;lucida sans unicode&#39;, arial, helvetica, sans-serif; font-size: 14px; text-align: -webkit-auto;&quot;&gt;
&lt;/div&gt;
&lt;h2&gt;

Is that all I need to know about images?&lt;/h2&gt;
There are a few more things you should know about images.&lt;br /&gt;
First, you can easily insert pictures located in other folders, or even pictures that are located on other websites:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Example 2:&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;div class=&quot;codebox&quot; style=&quot;border-bottom-color: gray; border-bottom-style: dotted; border-bottom-width: 2px; border-image: initial; border-left-color: gray; border-left-style: dotted; border-left-width: 2px; border-right-color: gray; border-right-style: dotted; border-right-width: 2px; border-top-color: gray; border-top-style: dotted; border-top-width: 2px; color: maroon; margin-bottom: 1em; padding-bottom: 0em; padding-left: 1em; padding-right: 1em; padding-top: 0em;&quot;&gt;
&lt;pre&gt; &lt;code&gt;
&lt;pre style=&quot;color: black;&quot;&gt;&lt;code&gt;&amp;lt;img src=&quot;images/logo.png&quot; /&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;pre&gt;&lt;code&gt; &lt;/code&gt;
 &lt;/pre&gt;
&lt;/div&gt;
&lt;strong&gt;Example 3:&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;codebox&quot; style=&quot;border-bottom-color: gray; border-bottom-style: dotted; border-bottom-width: 2px; border-image: initial; border-left-color: gray; border-left-style: dotted; border-left-width: 2px; border-right-color: gray; border-right-style: dotted; border-right-width: 2px; border-top-color: gray; border-top-style: dotted; border-top-width: 2px; color: maroon; margin-bottom: 1em; padding-bottom: 0em; padding-left: 1em; padding-right: 1em; padding-top: 0em;&quot;&gt;
&lt;pre&gt;&lt;code&gt;&lt;pre style=&quot;color: black;&quot;&gt;&lt;pre&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;img src=&quot;http://prog-teach.blogspot.com/logo.png&quot; /&amp;gt;&lt;/code&gt;&lt;span style=&quot;color: maroon;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;pre&gt;&lt;code&gt; &lt;/code&gt;
 &lt;/pre&gt;
&lt;/div&gt;
Second, images can be links:&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Example 4:&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;div class=&quot;codebox&quot; style=&quot;border-bottom-color: gray; border-bottom-style: dotted; border-bottom-width: 2px; border-image: initial; border-left-color: gray; border-left-style: dotted; border-left-width: 2px; border-right-color: gray; border-right-style: dotted; border-right-width: 2px; border-top-color: gray; border-top-style: dotted; border-top-width: 2px; margin-bottom: 1em; padding-bottom: 0em; padding-left: 1em; padding-right: 1em; padding-top: 0em;&quot;&gt;
&lt;pre&gt;&lt;code&gt;
&lt;pre style=&quot;color: black;&quot;&gt;&lt;pre&gt;&lt;code&gt; &amp;lt;a href=&quot;http://prog-teach.blogspot.com&quot;&amp;gt;
 &amp;lt;img src=&quot;logo.png&quot; /&amp;gt;&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;color: maroon;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;pre&gt;&lt;code&gt; &lt;/code&gt;
 &lt;/pre&gt;
&lt;/div&gt;
will look like this in the browser (try clicking on the image):&lt;br /&gt;
&lt;h2&gt;

Are there any other attributes I should know about?&lt;/h2&gt;
You always need to use the attribute &lt;code&gt;src&lt;/code&gt;, which tells the browser where the image is located. Besides that, there are a number of other attributes which can be useful when inserting images.&lt;br /&gt;
The &lt;code&gt;alt&lt;/code&gt; attribute is used to give an alternate description of an image if, for some reason, the image is not shown for the user. This is especially important for users with impaired vision, or if the page is loaded very slowly. Therefore, always use the &lt;code&gt;alt&lt;/code&gt; attribute:&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Example 5:&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;div class=&quot;codebox&quot; style=&quot;border-bottom-color: gray; border-bottom-style: dotted; border-bottom-width: 2px; border-image: initial; border-left-color: gray; border-left-style: dotted; border-left-width: 2px; border-right-color: gray; border-right-style: dotted; border-right-width: 2px; border-top-color: gray; border-top-style: dotted; border-top-width: 2px; margin-bottom: 1em; padding-bottom: 0em; padding-left: 1em; padding-right: 1em; padding-top: 0em;&quot;&gt;
&lt;pre&gt;&lt;code&gt;&lt;pre style=&quot;color: black;&quot;&gt;&lt;pre&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;img src=&quot;logo.gif&quot; alt=&quot;L&lt;/code&gt;&lt;code&gt;earn Programmation&lt;/code&gt; logo&quot; /&amp;gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;/code&gt;&lt;span style=&quot;color: maroon;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;pre&gt;&lt;code&gt; &lt;/code&gt;
 &lt;/pre&gt;
&lt;/div&gt;
Some browsers let the text of the alt attribute appear as a small pop-up box when the user places their cursor over the picture. Please note that when using the &lt;code&gt;alt&lt;/code&gt; attribute, the aim is to provide an alternative description of the picture. The &lt;code&gt;alt&lt;/code&gt; attribute should not be used to create special pop-up messages for the user since then visually impaired users will hear the message without knowing what the picture is.&lt;br /&gt;
&lt;br /&gt;
The &lt;code&gt;title&lt;/code&gt; attribute can be used to add information to the image:&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Example 6:&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;div class=&quot;codebox&quot; style=&quot;border-bottom-color: gray; border-bottom-style: dotted; border-bottom-width: 2px; border-image: initial; border-left-color: gray; border-left-style: dotted; border-left-width: 2px; border-right-color: gray; border-right-style: dotted; border-right-width: 2px; border-top-color: gray; border-top-style: dotted; border-top-width: 2px; margin-bottom: 1em; padding-bottom: 0em; padding-left: 1em; padding-right: 1em; padding-top: 0em;&quot;&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span style=&quot;white-space: normal;&quot;&gt;&lt;b&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code style=&quot;color: maroon;&quot;&gt;&lt;pre style=&quot;color: black;&quot;&gt;&lt;pre&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;img src=&quot;logo.gif&quot; title=&quot;Learn HTML from Learn Programmation&quot; /&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;/code&gt;&lt;span style=&quot;color: maroon;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;pre&gt;&lt;code&gt; &lt;/code&gt;
 &lt;/pre&gt;
&lt;/div&gt;
Will look like this in the browser:&lt;br /&gt;
&lt;br /&gt;
If you, without clicking, place the cursor over the image, you will see the text &quot;Learn HTML from&amp;nbsp;
http://prog-teach.blogspot.com&quot; appear as a pop-up box.*&lt;br /&gt;
&lt;br /&gt;
Two other important attributes are &lt;code&gt;width&lt;/code&gt; and &lt;code&gt;height&lt;/code&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Example 7:&lt;/strong&gt;&lt;br /&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;pre&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;&lt;div class=&quot;codebox&quot; style=&quot;border-bottom-color: gray; border-bottom-style: dotted; border-bottom-width: 2px; border-image: initial; border-left-color: gray; border-left-style: dotted; border-left-width: 2px; border-right-color: gray; border-right-style: dotted; border-right-width: 2px; border-top-color: gray; border-top-style: dotted; border-top-width: 2px; color: maroon; margin-bottom: 1em; padding-bottom: 0em; padding-left: 1em; padding-right: 1em; padding-top: 0em;&quot;&gt;
&lt;pre&gt;&lt;code&gt;&lt;pre style=&quot;color: black;&quot;&gt;&lt;pre&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;img src=&quot;logo.png&quot; width=&quot;141px&quot; height=&quot;32px&quot; /&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/code&gt; &lt;/pre&gt;
&lt;/div&gt;
will look like this in the browser:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;examplebox&quot;&gt;
&lt;/div&gt;
The &lt;code&gt;width&lt;/code&gt; and &lt;code&gt;height&lt;/code&gt; attributes can be used to set the height and width of an image. The value that is used to set the width and height is pixels. Pixels are the units of measurement used to measure the resolution of screens. (The most common screen resolution is 1024x768 pixels). Unlike centimetres, pixels are relative units of measurement which depend on the resolution of the screen. To a user with a high screen resolution, 25 pixels may correspond to 1 centimetre, while the same 25 pixel in a low screen resolution may correspond to 1.5 centimetres on the screen.&lt;br /&gt;
&lt;br /&gt;
If you do not set the width and height, the image will be inserted in its actual size. But with width and height you can manipulate the size:&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Example 8:&lt;/strong&gt;&lt;br /&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;pre&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;&lt;div class=&quot;codebox&quot; style=&quot;border-bottom-color: gray; border-bottom-style: dotted; border-bottom-width: 2px; border-image: initial; border-left-color: gray; border-left-style: dotted; border-left-width: 2px; border-right-color: gray; border-right-style: dotted; border-right-width: 2px; border-top-color: gray; border-top-style: dotted; border-top-width: 2px; margin-bottom: 1em; padding-bottom: 0em; padding-left: 1em; padding-right: 1em; padding-top: 0em;&quot;&gt;
&lt;pre&gt;&lt;code&gt;&lt;pre style=&quot;color: black;&quot;&gt;&lt;pre&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;img src=&quot;logo.gif&quot; width=&quot;32px&quot; height=&quot;32px&quot; /&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;color: maroon;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/code&gt;
 &lt;/pre&gt;
&lt;/div&gt;
will look like this in the browser:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;codebox&quot; style=&quot;border-bottom-color: gray; border-bottom-style: dotted; border-bottom-width: 2px; border-image: initial; border-left-color: gray; border-left-style: dotted; border-left-width: 2px; border-right-color: gray; border-right-style: dotted; border-right-width: 2px; border-top-color: gray; border-top-style: dotted; border-top-width: 2px; color: maroon; margin-bottom: 1em; padding-bottom: 0em; padding-left: 1em; padding-right: 1em; padding-top: 0em;&quot;&gt;
&lt;pre&gt; &lt;code&gt;
&lt;pre style=&quot;color: black;&quot;&gt;&lt;code&gt;&amp;lt;img src=&quot;images/logo.png&quot; /&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;color: black;&quot;&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;codebox&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
However, it is worth keeping in mind that the actual size in kilobytes of the image file will remain the same so it will take the same time to load the image as it did before, even though it appears smaller on the screen. Therefore, &lt;strong&gt;you should never decrease the image size by using the width and height attributes&lt;/strong&gt;.&amp;nbsp;Instead, you should always resize your images in an image editing program to make your pages lighter and faster.&lt;br /&gt;
&lt;br /&gt;
That said, it is still a good idea to use the width and height attributes because the browser will then be able to detect how much space the image will need in the final page layout before the image is fully downloaded. This allows your browser to set up the page nicely in a quicker way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prog-teach.blogspot.com/feeds/8609469174737499415/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prog-teach.blogspot.com/2012/03/show-images-in-html.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/8609469174737499415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/8609469174737499415'/><link rel='alternate' type='text/html' href='http://prog-teach.blogspot.com/2012/03/show-images-in-html.html' title='Show Images In HTML'/><author><name>Yahya prog</name><uri>http://www.blogger.com/profile/01103381213725850855</uri><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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlYysoJ68cDaFkFFusB9mtzqjKAS0ITM8U3hrVz3iZ5rhBGVoZJOVmKSq5U5v9bJjALnLPtr1Fe84oiVBHAbjUrQba-VgsoGut0cXbj1SF3VYkUmuF8Dc6oGWvct-anZKB4_zFspgK1iM/s72-c/imgres.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6179249185834200605.post-6707542334614883131</id><published>2012-03-30T11:10:00.002-07:00</published><updated>2012-03-30T11:15:00.903-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HTML"/><title type='text'>Tags And Elements</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;br /&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;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlYysoJ68cDaFkFFusB9mtzqjKAS0ITM8U3hrVz3iZ5rhBGVoZJOVmKSq5U5v9bJjALnLPtr1Fe84oiVBHAbjUrQba-VgsoGut0cXbj1SF3VYkUmuF8Dc6oGWvct-anZKB4_zFspgK1iM/s1600/imgres.jpg&quot; imageanchor=&quot;1&quot; style=&quot;background-color: #f7f7f7; color: #0177c6; font-family: Arial, Verdana, Tahoma; font-size: 12px; margin-left: 1em; margin-right: 1em; outline-color: initial; outline-style: none; outline-width: initial; text-align: center; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlYysoJ68cDaFkFFusB9mtzqjKAS0ITM8U3hrVz3iZ5rhBGVoZJOVmKSq5U5v9bJjALnLPtr1Fe84oiVBHAbjUrQba-VgsoGut0cXbj1SF3VYkUmuF8Dc6oGWvct-anZKB4_zFspgK1iM/s200/imgres.jpg&quot; style=&quot;border-bottom-color: rgb(222, 221, 221); border-bottom-style: solid; border-bottom-width: 2px; border-image: initial; border-left-color: rgb(222, 221, 221); border-left-style: solid; border-left-width: 2px; border-right-color: rgb(222, 221, 221); border-right-style: solid; border-right-width: 2px; border-top-color: rgb(222, 221, 221); border-top-style: solid; border-top-width: 2px; margin-bottom: 0px; margin-left: 1px; margin-right: 5px; margin-top: 1px; max-width: 650px;&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; font-family: sans-serif, &#39;trebuchet ms&#39;, &#39;lucida grande&#39;, &#39;lucida sans unicode&#39;, arial, helvetica, sans-serif; font-size: 14px; text-align: -webkit-auto;&quot;&gt;
&lt;/div&gt;
Elements give structure to a HTML document and tells the browser how you want your website to be presented. Generally elements consists of a start tag, some content, and an end tag.&lt;br /&gt;
&lt;h2&gt;

&quot;Tags&quot;?&lt;/h2&gt;
Tags are labels you use to mark up the begining and end of an element.&lt;br /&gt;
&lt;br /&gt;
All tags have the same format: they begin with a less-than sign &quot;&amp;lt;&quot; and end with a greater-than sign &quot;&amp;gt;&quot;. &lt;br /&gt;
Generally speaking, there are two kinds of tags - opening tags: &amp;lt;html&amp;gt; and closing tags: &amp;lt;/html&amp;gt;. The only difference between an opening tag and a closing tag is the forward slash &quot;/&quot;. You label content by putting it between an opening tag and a closing tag.&lt;br /&gt;
&lt;br /&gt;
HTML is all about elements. To learn HTML is to learn and use different tags.&lt;br /&gt;
&lt;h2&gt;

Can you show me some examples?&lt;/h2&gt;
Okay, the element &lt;code&gt;em&lt;/code&gt; emphasis text. All text between the opening tag &lt;code&gt;&amp;lt;em&amp;gt;&lt;/code&gt; and the closing tag &lt;code&gt;&amp;lt;/em&amp;gt;&lt;/code&gt; is emphasised in the browser. (&quot;em&quot; is short for &quot;emphasis&quot;.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Example 1:&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;div class=&quot;codebox&quot; style=&quot;border-bottom-color: gray; border-bottom-style: dotted; border-bottom-width: 2px; border-image: initial; border-left-color: gray; border-left-style: dotted; border-left-width: 2px; border-right-color: gray; border-right-style: dotted; border-right-width: 2px; border-top-color: gray; border-top-style: dotted; border-top-width: 2px; color: maroon; margin-bottom: 1em; padding-bottom: 0em; padding-left: 1em; padding-right: 1em; padding-top: 0em;&quot;&gt;
&lt;pre&gt; &lt;code&gt;
 &amp;lt;em&amp;gt;Emphasised text.&amp;lt;/em&amp;gt;
 &lt;/code&gt;
 &lt;/pre&gt;
&lt;/div&gt;
Will look like this in the browser:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;examplebox&quot;&gt;
&lt;em&gt;Emphasised text.&lt;/em&gt;&lt;/div&gt;
&lt;div class=&quot;examplebox&quot;&gt;
&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/div&gt;
The elements &lt;code&gt;h1&lt;/code&gt;, &lt;code&gt;h2&lt;/code&gt;, &lt;code&gt;h3&lt;/code&gt;, &lt;code&gt;h4&lt;/code&gt;, &lt;code&gt;h5&lt;/code&gt; and &lt;code&gt;h6&lt;/code&gt; is used to make headings (h stands for &quot;heading&quot;), where &lt;code&gt;h1&lt;/code&gt; is the first level and normally the largest text, &lt;code&gt;h2&lt;/code&gt; is the second level and normally slightly smaller text, and &lt;code&gt;h6&lt;/code&gt; is the sixth and last in the hierarchy of headings and normally the smallest text.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Example 2:&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;div class=&quot;codebox&quot; style=&quot;border-bottom-color: gray; border-bottom-style: dotted; border-bottom-width: 2px; border-image: initial; border-left-color: gray; border-left-style: dotted; border-left-width: 2px; border-right-color: gray; border-right-style: dotted; border-right-width: 2px; border-top-color: gray; border-top-style: dotted; border-top-width: 2px; color: maroon; margin-bottom: 1em; padding-bottom: 0em; padding-left: 1em; padding-right: 1em; padding-top: 0em;&quot;&gt;
&lt;pre&gt; &lt;code&gt;

&lt;pre style=&quot;color: black;&quot;&gt;&lt;code&gt;&amp;lt;h1&amp;gt;This is a heading&amp;lt;/h1&amp;gt;
 &amp;lt;h2&amp;gt;This is a subheading&amp;lt;/h2&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/code&gt;
 &lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Will look like this in the browser:&lt;br /&gt;
&lt;div class=&quot;examplebox&quot;&gt;
&lt;h1&gt;

This is a heading&lt;/h1&gt;
&lt;h2&gt;

This is a subheading&lt;/h2&gt;
&lt;/div&gt;
&lt;h2&gt;

So, I always need an opening tag and a closing tag?&lt;/h2&gt;
As they say, there&#39;s an exception to every rule and in HTML the exception is that there are a few elements which both open and close in the same tag. These so-called empty elements are not connected to a specific passage in the text but rather are isolated labels, for example, a line break which looks like this: &lt;code&gt;&amp;lt;br /&amp;gt;&lt;/code&gt;.&lt;br /&gt;
&lt;h2&gt;

Should tags be typed in uppercase or lowercase?&lt;/h2&gt;
Most browsers might not care if you type your tags in upper, lower or mixed cases. &amp;lt;HTML&amp;gt;, &amp;lt;html&amp;gt; or &amp;lt;HtMl&amp;gt; will normally give the same result. However, the &lt;strong&gt;correct&lt;/strong&gt; way is to type tags in lowercase. So get into the &lt;strong&gt;habit of writing your tags in lowercase&lt;/strong&gt;.&lt;br /&gt;
&lt;h2&gt;

Where do I put all these tags?&lt;/h2&gt;
You type your tags in an HTML document. A website contains one or more HTML documents. When you surf the Web, you merely open different HTML documents.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prog-teach.blogspot.com/feeds/6707542334614883131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prog-teach.blogspot.com/2012/03/tags-and-elements.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/6707542334614883131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/6707542334614883131'/><link rel='alternate' type='text/html' href='http://prog-teach.blogspot.com/2012/03/tags-and-elements.html' title='Tags And Elements'/><author><name>Yahya prog</name><uri>http://www.blogger.com/profile/01103381213725850855</uri><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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlYysoJ68cDaFkFFusB9mtzqjKAS0ITM8U3hrVz3iZ5rhBGVoZJOVmKSq5U5v9bJjALnLPtr1Fe84oiVBHAbjUrQba-VgsoGut0cXbj1SF3VYkUmuF8Dc6oGWvct-anZKB4_zFspgK1iM/s72-c/imgres.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6179249185834200605.post-5850843224501189242</id><published>2012-03-29T11:14:00.003-07:00</published><updated>2012-03-29T11:17:01.900-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HTML"/><title type='text'>What is HTML ?</title><content type='html'>&lt;br /&gt;
&lt;strong&gt;HTML is the &quot;mother tongue&quot; of your browser.&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
To make a long story short, HTML was invented in 1990 by a scientist called Tim Berners-Lee. The purpose was to make it easier for scientists at different universities to gain access to each other&#39;s research documents. The project became a bigger success than Tim Berners-Lee had ever imagined. By inventing HTML he laid the foundation for the web as we know it today.&lt;br /&gt;
&lt;br /&gt;
HTML is a language, which makes it possible to present information (e.g. scientific research) on the Internet. What you see when you view a page on the Internet is your browser&#39;s interpretation of HTML. To see the HTML code of a page on the Internet, simply click &quot;View&quot; in the top menu of your browser and choose &quot;Source&quot;.&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;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVC-uJiWAxhLgj_sm6h506jkSCGqaEtPbL4LwwUiL5V04Rm5tGgsBHMbbCJLZ-9be5ymQ8uy7kemE00jT42re_e-I4o4c0IY5LqAumMqEm6lUopDmatKJRAflprt7jNv0eO0Vjl1EaxuQ/s1600/HTML.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVC-uJiWAxhLgj_sm6h506jkSCGqaEtPbL4LwwUiL5V04Rm5tGgsBHMbbCJLZ-9be5ymQ8uy7kemE00jT42re_e-I4o4c0IY5LqAumMqEm6lUopDmatKJRAflprt7jNv0eO0Vjl1EaxuQ/s1600/HTML.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
For the untrained eye, HTML code looks complicated but this tutorial will help you make sense of it all.&lt;br /&gt;
&lt;h2&gt;

What can I use HTML for?&lt;/h2&gt;
If you want to make websites, there is no way around HTML. Even if you&#39;re using a program to create websites, such as Dreamweaver, a basic knowledge of HTML can make life a lot simpler and your website a lot better. The good news is that HTML is easy to learn and use. In just two lessons from now you will have learned how to make your first website.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;HTML is used to make websites.  It is as simple as that!&lt;/strong&gt;&lt;br /&gt;
&lt;h2&gt;

Okay, but what does H-T-M-L stand for?&lt;/h2&gt;
HTML is an abbreviation of &quot;HyperText Mark-up Language&quot; - which is already more than you need to know at this stage. However, for the sake of good order, let us explain in greater detail.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Hyper&lt;/strong&gt; is the opposite of linear. In the good old days - when a mouse was something the cat chased - computer programs ran linearly: when the program had executed one action it went to the next line and after that, the next line and so on. But HTML is different - you can go wherever you want and whenever you want.  For example, it is not necessary to visit MSN.com before you visit HTML.net.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Text&lt;/strong&gt; is self-explanatory.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Mark-up&lt;/strong&gt; is what you do with the text. You are marking up the text the same way you do in a text editing program with headings, bullets and bold text and so on.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Language&lt;/strong&gt; is what HTML is. It uses many English words.&lt;/li&gt;
&lt;/ul&gt;
In this tutorial you will learn so-called XHTML (Extensible HyperText Mark-up Language) which, in short, is a new and more well-structured way of writing HTML.&lt;br /&gt;
&lt;br /&gt;
Now you know what HTML (and XHTML) stands for let&#39;s get started with what it is all about: making websites.&lt;br /&gt;
&lt;hr /&gt;</content><link rel='replies' type='application/atom+xml' href='http://prog-teach.blogspot.com/feeds/5850843224501189242/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prog-teach.blogspot.com/2012/03/what-is-html.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/5850843224501189242'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/5850843224501189242'/><link rel='alternate' type='text/html' href='http://prog-teach.blogspot.com/2012/03/what-is-html.html' title='What is HTML ?'/><author><name>Yahya prog</name><uri>http://www.blogger.com/profile/01103381213725850855</uri><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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVC-uJiWAxhLgj_sm6h506jkSCGqaEtPbL4LwwUiL5V04Rm5tGgsBHMbbCJLZ-9be5ymQ8uy7kemE00jT42re_e-I4o4c0IY5LqAumMqEm6lUopDmatKJRAflprt7jNv0eO0Vjl1EaxuQ/s72-c/HTML.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6179249185834200605.post-105520641213671944</id><published>2012-03-29T11:03:00.000-07:00</published><updated>2012-03-29T11:28:52.844-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HTML"/><title type='text'>Your first step in HTML , Introduction</title><content type='html'>People often think it is extremely difficult to make a website. That is not the case! &lt;strong&gt;Everyone can learn how to make a website&lt;/strong&gt;. And if you read on, you will have made one in just one hour.&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;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlYysoJ68cDaFkFFusB9mtzqjKAS0ITM8U3hrVz3iZ5rhBGVoZJOVmKSq5U5v9bJjALnLPtr1Fe84oiVBHAbjUrQba-VgsoGut0cXbj1SF3VYkUmuF8Dc6oGWvct-anZKB4_zFspgK1iM/s1600/imgres.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlYysoJ68cDaFkFFusB9mtzqjKAS0ITM8U3hrVz3iZ5rhBGVoZJOVmKSq5U5v9bJjALnLPtr1Fe84oiVBHAbjUrQba-VgsoGut0cXbj1SF3VYkUmuF8Dc6oGWvct-anZKB4_zFspgK1iM/s1600/imgres.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Others believe - just as mistakenly - that expensive and advanced software is needed to make websites. It is true that there are lots of different programs that claim they can create a website for you. Some come closer than others. But if you want it done right, you must do it yourself. Fortunately, &lt;strong&gt;it is simple and free and you already have all the software you need&lt;/strong&gt;.&lt;br /&gt;
&lt;br /&gt;
The aim of this tutorial is to give you an easy, yet thorough and correct introduction to how to make websites. &lt;strong&gt;The tutorial starts from scratch and requires absolutely no prior knowledge of programming&lt;/strong&gt;.&lt;br /&gt;
&lt;br /&gt;
The tutorial cannot show you everything. So some engagement and a will to experiment are required. But don&#39;t worry - learning how to make websites is a lot of fun and gives a tremendous amount of satisfaction when you get it right.&lt;br /&gt;
&lt;br /&gt;
How you choose to use the tutorial is up to you. But we suggest you read only two or three lessons a day and take time to experiment with the new things you learn in each lesson.&lt;br /&gt;
Okay, enough talk. Let&#39;s get started!</content><link rel='replies' type='application/atom+xml' href='http://prog-teach.blogspot.com/feeds/105520641213671944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prog-teach.blogspot.com/2012/03/your-first-step-in-html-introduction.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/105520641213671944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6179249185834200605/posts/default/105520641213671944'/><link rel='alternate' type='text/html' href='http://prog-teach.blogspot.com/2012/03/your-first-step-in-html-introduction.html' title='Your first step in HTML , Introduction'/><author><name>Yahya prog</name><uri>http://www.blogger.com/profile/01103381213725850855</uri><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="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlYysoJ68cDaFkFFusB9mtzqjKAS0ITM8U3hrVz3iZ5rhBGVoZJOVmKSq5U5v9bJjALnLPtr1Fe84oiVBHAbjUrQba-VgsoGut0cXbj1SF3VYkUmuF8Dc6oGWvct-anZKB4_zFspgK1iM/s72-c/imgres.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>