<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://ideawaza.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=203.122.0.0%2F16</id>
	<title>IdeaWazaWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://ideawaza.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=203.122.0.0%2F16"/>
	<link rel="alternate" type="text/html" href="https://ideawaza.com/wiki/Special:Contributions/203.122.0.0/16"/>
	<updated>2026-09-30T18:30:15Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://ideawaza.com/index.php?title=Archive:PHP_and_MySQL_Programming/File_Handling&amp;diff=42647</id>
		<title>Archive:PHP and MySQL Programming/File Handling</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Archive:PHP_and_MySQL_Programming/File_Handling&amp;diff=42647"/>
		<updated>2008-01-08T11:01:04Z</updated>

		<summary type="html">&lt;p&gt;203.122.47.177: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
As with most programming languages, filehandling is very important for storing and retrieving a wide variety of data.hello her e&lt;br /&gt;
&lt;br /&gt;
== Opening and Closing Files ==&lt;br /&gt;
&lt;br /&gt;
To open a file, we use the fopen() function. This function takes in two parameters. Firstly, a String containing the name of the file, and secondly, the mode with which to open the file with. It returns a filehandler. e.g. :&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?&lt;br /&gt;
 $filename = &amp;quot;text.txt&amp;quot;;&lt;br /&gt;
 $f = fopen($filename, &#039;r&#039;);&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above code assigns the file name of &amp;quot;text.txt&amp;quot; to a variable called $filename. Then it uses the fopen function to open up &amp;quot;text.txt&amp;quot; with &#039;r&#039; mode (meaning &amp;quot;read mode&amp;quot;) and returns a filehandler to $f.&lt;br /&gt;
&lt;br /&gt;
To close a file, we simply call the fclose() function, and pass it the filehandler. e.g. :&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?&lt;br /&gt;
 fclose($f);&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Including a File ==&lt;br /&gt;
&lt;br /&gt;
It is very easy, in PHP, to include code (be it PHP or HTML) from one file into another. This is achieved by means of the include() function.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?&lt;br /&gt;
 include (&amp;quot;objects.php&amp;quot;);&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the PHP code will look within the current directory of the PHP file calling the include function, it will then open the objects.php file, and include its content at of that file at the position of the include() function.&lt;br /&gt;
&lt;br /&gt;
== Writing to a File ==&lt;br /&gt;
&lt;br /&gt;
The procedure for writing to a file is:&lt;br /&gt;
1. Create a file handler.&lt;br /&gt;
2. Use the file handler to open up an input stream from a file.&lt;br /&gt;
3. Write Data to the file handler.&lt;br /&gt;
4. Close the file handler.&lt;br /&gt;
&lt;br /&gt;
Here is an example of writing two lines of text to a file:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?&lt;br /&gt;
 $filename = &amp;quot;file.txt&amp;quot;;&lt;br /&gt;
 $f = fopen($filename, &#039;w&#039;);&lt;br /&gt;
 fputs($f, &amp;quot;Bonjour Madam.\n&amp;quot;);&lt;br /&gt;
 fputs($f, &amp;quot;Bonjour Monseur.\n&amp;quot;);&lt;br /&gt;
 fclose($f);&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
fputs() is used to write data to the file. It takes 2 variables, firstly, the file handler, and secondly, a String to write to the file handler.&lt;br /&gt;
&lt;br /&gt;
== Reading from a File ==&lt;br /&gt;
&lt;br /&gt;
Reading from a file goes along much the same format as writing to one. The function used to read from a file is fgets() function. Which takes in two variables. Firstly, the filehandler from which to read, and secondly, the amount of data to retrieve.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?&lt;br /&gt;
 $filename = &amp;quot;text.txt&amp;quot;;&lt;br /&gt;
 $f = fopen($filename, &#039;r&#039;);&lt;br /&gt;
 $line = fgets($f, 1024);&lt;br /&gt;
 print $line;&lt;br /&gt;
 print $total_contents;&lt;br /&gt;
 fclose($f);&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above code opens up a file, reads the first line of the file, and then displays it. If we wanted to rather read the entire contents of the file into a variable, we could replace the $line=fgets() line with : &lt;br /&gt;
&lt;br /&gt;
  $total_contents = fread($f, filesize($filename));&lt;br /&gt;
&lt;br /&gt;
[[../Syntax Overview/|Previous: Syntax Overview]] | [[../|TOC]] | [[../Database Connectivity/|Next: Database Connectivity]]&lt;br /&gt;
&lt;br /&gt;
[[Category:PHP and MySQL Programming|{{SUBPAGENAME}}]]&lt;/div&gt;</summary>
		<author><name>203.122.47.177</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=JavaScript/Basics&amp;diff=36908</id>
		<title>JavaScript/Basics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=JavaScript/Basics&amp;diff=36908"/>
		<updated>2007-07-05T22:53:08Z</updated>

		<summary type="html">&lt;p&gt;203.122.244.203: /* Second Lesson */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;[[Basic JavaScript]] is a course under the [[Topic:Javascript | topic of JavaScript]]&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
What you should know - HTML/XHTML&lt;br /&gt;
&lt;br /&gt;
Basics - &lt;br /&gt;
*JavaScript is the most popular web page scripting language and is suppported by almost every browser.&lt;br /&gt;
*It adds interactivity to your web pages.&lt;br /&gt;
*You can use only the tools already on your computer without the need to download any software.&lt;br /&gt;
*It is easy and fun&lt;br /&gt;
&lt;br /&gt;
== First Lesson ==&lt;br /&gt;
&lt;br /&gt;
Open up your text editor of choice and create a basic page. Now I am going to teach you how to write on your webpage using JavaScript.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
 	&amp;lt;body&amp;gt;&lt;br /&gt;
 		&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
 			document.write(&amp;quot;Your Penis Is Connected To Your Head!&amp;quot;)&lt;br /&gt;
 		&amp;lt;/script&amp;gt;&lt;br /&gt;
 	&amp;lt;/body&amp;gt;&lt;br /&gt;
 &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, JavaScript is for gay people like your mum.&lt;br /&gt;
&lt;br /&gt;
To start off with, the &amp;lt;script type&amp;quot;text/javascript&amp;quot;&amp;gt; tag tells the browser that whatever comes between that tag and the coming &amp;lt;/script&amp;gt; tag is JavaScript. Similarly, to use [[wikipedia:VBScript | VBScript]], you might add a &amp;lt;script type=&amp;quot;text/vbscript&amp;quot;&amp;gt; tag. For the purposes of this course, though, you should only ever need to use the JavaScript tag.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
It is also important to note that JavaScript is case sensitive. What this means is what ever you type must be in capitalized the way it should be. For example, if you wrote &lt;br /&gt;
 &amp;lt;ScRiPt TyPe=&amp;quot;TeXt/JaVaScRiPt&amp;quot;&amp;gt;&lt;br /&gt;
not only would you waste a lot of time typing, but you would also confuse your browser.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
You are probably wondering when I&#039;m going to explain the rest of what you did. Well, document.write is the JavaScript standard for writing text to the browser window. The &#039;document&#039; clause refers to the HTML webpage (termed a document) as a whole; what follows (&#039;.write&#039;) is a command for the document object to carry out.  In this case, you told the page to write the classic &amp;quot;Hello World&amp;quot; to the screen.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
These are the absolute essentials to understand for starting JavaScript.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
--[[User:Xora K Joken|Xora K Joken]] 19:18, 3 April 2007 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
GO SUN!!!!!!!!!!!!!!&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Shut up Joe&lt;/div&gt;</summary>
		<author><name>203.122.244.203</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=JavaScript/Basics&amp;diff=36907</id>
		<title>JavaScript/Basics</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=JavaScript/Basics&amp;diff=36907"/>
		<updated>2007-07-05T22:52:26Z</updated>

		<summary type="html">&lt;p&gt;203.122.244.203: /* First Lesson */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;[[Basic JavaScript]] is a course under the [[Topic:Javascript | topic of JavaScript]]&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
What you should know - HTML/XHTML&lt;br /&gt;
&lt;br /&gt;
Basics - &lt;br /&gt;
*JavaScript is the most popular web page scripting language and is suppported by almost every browser.&lt;br /&gt;
*It adds interactivity to your web pages.&lt;br /&gt;
*You can use only the tools already on your computer without the need to download any software.&lt;br /&gt;
*It is easy and fun&lt;br /&gt;
&lt;br /&gt;
== First Lesson ==&lt;br /&gt;
&lt;br /&gt;
Open up your text editor of choice and create a basic page. Now I am going to teach you how to write on your webpage using JavaScript.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
 	&amp;lt;body&amp;gt;&lt;br /&gt;
 		&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
 			document.write(&amp;quot;Your Penis Is Connected To Your Head!&amp;quot;)&lt;br /&gt;
 		&amp;lt;/script&amp;gt;&lt;br /&gt;
 	&amp;lt;/body&amp;gt;&lt;br /&gt;
 &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, JavaScript is for gay people like your mum.&lt;br /&gt;
&lt;br /&gt;
To start off with, the &amp;lt;script type&amp;quot;text/javascript&amp;quot;&amp;gt; tag tells the browser that whatever comes between that tag and the coming &amp;lt;/script&amp;gt; tag is JavaScript. Similarly, to use [[wikipedia:VBScript | VBScript]], you might add a &amp;lt;script type=&amp;quot;text/vbscript&amp;quot;&amp;gt; tag. For the purposes of this course, though, you should only ever need to use the JavaScript tag.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
It is also important to note that JavaScript is case sensitive. What this means is what ever you type must be in capitalized the way it should be. For example, if you wrote &lt;br /&gt;
 &amp;lt;ScRiPt TyPe=&amp;quot;TeXt/JaVaScRiPt&amp;quot;&amp;gt;&lt;br /&gt;
not only would you waste a lot of time typing, but you would also confuse your browser.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
You are probably wondering when I&#039;m going to explain the rest of what you did. Well, document.write is the JavaScript standard for writing text to the browser window. The &#039;document&#039; clause refers to the HTML webpage (termed a document) as a whole; what follows (&#039;.write&#039;) is a command for the document object to carry out.  In this case, you told the page to write the classic &amp;quot;Hello World&amp;quot; to the screen.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
These are the absolute essentials to understand for starting JavaScript.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
--[[User:Xora K Joken|Xora K Joken]] 19:18, 3 April 2007 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Second Lesson==&lt;br /&gt;
&lt;br /&gt;
This second lesson will introduce the topics of variables and operators.&lt;br /&gt;
&lt;br /&gt;
===Variables===&lt;br /&gt;
&lt;br /&gt;
One of the things JavaScript is used for is the manipulation of data. In JavaScript, pieces of data can either be stored in variables or arrays.&lt;br /&gt;
&lt;br /&gt;
Variables are declared using the &#039;&#039;var&#039;&#039; keyword:&lt;br /&gt;
 var numValue;&lt;br /&gt;
 var textValue;&lt;br /&gt;
 var binaryValue;&lt;br /&gt;
and can be given values when they are created:&lt;br /&gt;
 var numValue = 3;&lt;br /&gt;
 var textValue = &amp;quot;This is text.&amp;quot;;&lt;br /&gt;
 var binaryValue = true;&lt;br /&gt;
Multiple variables can even be declared at the same time:&lt;br /&gt;
 var numValue = 3, textValue = &amp;quot;This is text.&amp;quot;, binaryValue = true;&lt;br /&gt;
Variables in JavaScript are weakly typed, meaning that the types of individual variables are not determined by the programmer. Unlike many languages, JavaScript only provides a generic &#039;&#039;var&#039;&#039; rather than separate types for integers, floating point numbers, characters, and strings. For example, in the statement&lt;br /&gt;
 var x = 0;&lt;br /&gt;
it is fairly obvious to any individual reading the code that x is a number. However, if the statement&lt;br /&gt;
 x = x + &amp;quot;This is text that is probably not a number&amp;quot;;&lt;br /&gt;
were to appear later in the code, JavaScript would change the variable to a text variable. This is one of the reasons that JavaScript is referred to as weakly typed; at any particular point in time, it is impossible to tell exactly what type a particular variable is.&lt;br /&gt;
&lt;br /&gt;
====Arrays====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Arrays in most languages are a means of collecting variables so that they can be referred to by an index. This is usually a numerical index beginning at 0(i.e., 0,1,2,...), but does not necessarily have to be a number. Arrays are declared in several ways; they can be declared either explicitly, indicating the number of variables in the array:&lt;br /&gt;
&lt;br /&gt;
 var colors = new Array(7);&lt;br /&gt;
&lt;br /&gt;
or not:&lt;br /&gt;
&lt;br /&gt;
 var colors = new Array();&lt;br /&gt;
&lt;br /&gt;
In the last case, the programmer leaves the number of colors open-ended. This may allow him to be more flexible in the long run. &lt;br /&gt;
&lt;br /&gt;
To use a particular variable within the array, simply indicate the index of the element using brackets. :&lt;br /&gt;
&lt;br /&gt;
 colors[2] = &amp;quot;orange&amp;quot;;&lt;br /&gt;
 x = colors[7] ;&lt;br /&gt;
 z = &amp;quot;The book&#039;s color is &amp;quot; + colors[5] + &amp;quot;.&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It was mentioned before that arrays can use indexes other than numbers. One example of this might be using an index based on text instead of numbers. We might wish to index on the names of various fruits to get their colors:&lt;br /&gt;
 &lt;br /&gt;
 colors[&amp;quot;lemon&amp;quot;] = &amp;quot;yellow&amp;quot;;&lt;br /&gt;
 colors[&amp;quot;lime&amp;quot;] = &amp;quot;green&amp;quot;;&lt;br /&gt;
 colors[&amp;quot;cherry&amp;quot;] = &amp;quot;red&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Programs can be made significantly more readable using this feature.&lt;br /&gt;
&lt;br /&gt;
 document.write(&amp;quot;The color of a cherry is &amp;quot; + colors[cherry]&lt;br /&gt;
                     + &amp;quot;, but the color of a lime is &amp;quot; + colors[lime]);&lt;br /&gt;
&lt;br /&gt;
===Operators===&lt;br /&gt;
----&lt;br /&gt;
==== Arithmatic Operators ====&lt;br /&gt;
{| border=1 cellspacing=0 cellpadding=5&lt;br /&gt;
| &#039;&#039;&#039;Operator&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Result&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
| +&lt;br /&gt;
| Addition&lt;br /&gt;
| x = 2&lt;br /&gt;
y = 2&lt;br /&gt;
&lt;br /&gt;
x + y&lt;br /&gt;
| 4&lt;br /&gt;
|-&lt;br /&gt;
| -&lt;br /&gt;
| Subtraction&lt;br /&gt;
| x = 5&lt;br /&gt;
y = 2&lt;br /&gt;
&lt;br /&gt;
x - y&lt;br /&gt;
| 3&lt;br /&gt;
|-&lt;br /&gt;
| *&lt;br /&gt;
| Multiplication&lt;br /&gt;
| x = 5&lt;br /&gt;
y = 4&lt;br /&gt;
&lt;br /&gt;
x * y&lt;br /&gt;
| 20&lt;br /&gt;
|-&lt;br /&gt;
| /&lt;br /&gt;
| Division&lt;br /&gt;
| 15 / 5&lt;br /&gt;
5 / 2&lt;br /&gt;
| 3&lt;br /&gt;
2.5&lt;br /&gt;
|-&lt;br /&gt;
| %&lt;br /&gt;
| Modulus (division remainder)&lt;br /&gt;
| 5 % 2&lt;br /&gt;
10 % 8&lt;br /&gt;
&lt;br /&gt;
10 % 2 &lt;br /&gt;
| 1&lt;br /&gt;
2&lt;br /&gt;
&lt;br /&gt;
0&lt;br /&gt;
|-&lt;br /&gt;
| ++&lt;br /&gt;
| Increment&lt;br /&gt;
| x = 5&lt;br /&gt;
x++&lt;br /&gt;
| 6&lt;br /&gt;
|-&lt;br /&gt;
| --&lt;br /&gt;
| Decrement&lt;br /&gt;
| x = 5&lt;br /&gt;
x--&lt;br /&gt;
| 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Assignment Operators ====&lt;br /&gt;
{| border=1 cellspacing=0 cellpadding=5&lt;br /&gt;
| &#039;&#039;&#039;Operator&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Is The Same As&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
| =&lt;br /&gt;
| x = y&lt;br /&gt;
| x = y&lt;br /&gt;
|-&lt;br /&gt;
| +=&lt;br /&gt;
| x += y&lt;br /&gt;
| x = x + y&lt;br /&gt;
|-&lt;br /&gt;
| -=&lt;br /&gt;
| x -= y&lt;br /&gt;
| x = x - y&lt;br /&gt;
|-&lt;br /&gt;
| *=&lt;br /&gt;
| x *= y&lt;br /&gt;
| x = x * y&lt;br /&gt;
|-&lt;br /&gt;
| /=&lt;br /&gt;
| x /= y&lt;br /&gt;
| x = x / y&lt;br /&gt;
|-&lt;br /&gt;
| %=&lt;br /&gt;
| x %= y&lt;br /&gt;
| x = x % y&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Comparison Operators ====&lt;br /&gt;
{| border=1 cellspacing=0 cellpadding=5&lt;br /&gt;
| &#039;&#039;&#039;Operator&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
| ==&lt;br /&gt;
| is equal to&lt;br /&gt;
| 5 == 8 returns false&lt;br /&gt;
|-&lt;br /&gt;
| ===&lt;br /&gt;
| is equal to (checks for both value and type)&lt;br /&gt;
| x = 5 &lt;br /&gt;
y = &amp;quot;5&amp;quot;&lt;br /&gt;
&lt;br /&gt;
x == y returns true&lt;br /&gt;
&lt;br /&gt;
x === y returns false&lt;br /&gt;
|-&lt;br /&gt;
| !=&lt;br /&gt;
| is not equal&lt;br /&gt;
| 5 != 8 returns true&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;&lt;br /&gt;
| is greater than&lt;br /&gt;
| 5 &amp;gt; 8 returns false&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;&lt;br /&gt;
| is less than&lt;br /&gt;
| 5 &amp;lt; 8 returns true&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;=&lt;br /&gt;
| is greater than or equal to &lt;br /&gt;
| 5 &amp;gt;= 8 returns false&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;=&lt;br /&gt;
| is less than or equal to&lt;br /&gt;
| 5 &amp;lt;= 8 returns true&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Logical Operators ====&lt;br /&gt;
{| border=1 cellspacing=0 cellpadding=5&lt;br /&gt;
| &#039;&#039;&#039;Operator&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;&amp;amp;&lt;br /&gt;
| and&lt;br /&gt;
| x = 6&lt;br /&gt;
y = 3&lt;br /&gt;
&lt;br /&gt;
(x &amp;lt; 10 &amp;amp;&amp;amp; y &amp;gt; 1) returns true&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;!-- The || operator can&#039;t be expressed because the MediaWiki technology thinks you are defining new columns. I don&#039;t know how to escape the ||... so if you do fix this please. Thanks. --&amp;gt;&lt;br /&gt;
| or&lt;br /&gt;
| x = 6&lt;br /&gt;
y = 3&lt;br /&gt;
&lt;br /&gt;
(x == 5 || y == 5) returns false&lt;br /&gt;
|-&lt;br /&gt;
| !&lt;br /&gt;
| not&lt;br /&gt;
| x = 6&lt;br /&gt;
y = 3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- !(x == y) returns true --&amp;gt; &amp;lt;!-- The example to the left can&#039;t be displayed as is because conflicts with the MediaWiki parsing technology... Please fix. Thanks. --&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== String Operator ====&lt;br /&gt;
The string operator is used to [[w:concatenate | concatenate]] two strings together. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; var x = &amp;quot;Hello&amp;quot; + &amp;quot;world!&amp;quot; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example would result in the variable x equaling &amp;quot;Hello world!&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Conditional Operator ====&lt;br /&gt;
JavaScript also contains a conditional operator that assigns a value to a variable based on some condition.&lt;br /&gt;
&lt;br /&gt;
The syntax would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; variablename = ( condition ) ? value1 : value2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; greeting = ( visitor == &amp;quot;PRES&amp;quot; ) ? &amp;quot;Dear President &amp;quot; : &amp;quot;Dear &amp;quot; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:JavaScript]]&lt;br /&gt;
[[Category:Basics]]&lt;/div&gt;</summary>
		<author><name>203.122.244.203</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Template:Start_box&amp;diff=10608</id>
		<title>Template:Start box</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Template:Start_box&amp;diff=10608"/>
		<updated>2005-08-12T14:16:40Z</updated>

		<summary type="html">&lt;p&gt;203.122.81.134: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;border:3px dotted #4b0082; background-color:#fff0f0; padding:1em; margin:1em;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;&lt;/div&gt;</summary>
		<author><name>203.122.81.134</name></author>
	</entry>
</feed>