<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=PHP-and-MySQL%2FC2%2FMulti-Dimensional-Arrays%2FEnglish</id>
		<title>PHP-and-MySQL/C2/Multi-Dimensional-Arrays/English - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=PHP-and-MySQL%2FC2%2FMulti-Dimensional-Arrays%2FEnglish"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=PHP-and-MySQL/C2/Multi-Dimensional-Arrays/English&amp;action=history"/>
		<updated>2026-04-06T02:21:31Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=PHP-and-MySQL/C2/Multi-Dimensional-Arrays/English&amp;diff=532&amp;oldid=prev</id>
		<title>Chandrika: Created page with '{| border=1 !Time !Narration |- |0:00  |A multdimensional array is an array inside which you can store other arrays. |- |0:06- 0:08  |It is very similar to the associative array.…'</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=PHP-and-MySQL/C2/Multi-Dimensional-Arrays/English&amp;diff=532&amp;oldid=prev"/>
				<updated>2012-11-29T06:34:04Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039;{| border=1 !Time !Narration |- |0:00  |A multdimensional array is an array inside which you can store other arrays. |- |0:06- 0:08  |It is very similar to the associative array.…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{| border=1&lt;br /&gt;
!Time&lt;br /&gt;
!Narration&lt;br /&gt;
|-&lt;br /&gt;
|0:00 &lt;br /&gt;
|A multdimensional array is an array inside which you can store other arrays.&lt;br /&gt;
|-&lt;br /&gt;
|0:06- 0:08 &lt;br /&gt;
|It is very similar to the associative array.&lt;br /&gt;
|-&lt;br /&gt;
|0:09- 0:14 &lt;br /&gt;
|However, the associates for this array are arrays themselves.&lt;br /&gt;
|-&lt;br /&gt;
|0:15- 0:18 &lt;br /&gt;
|For a better understanding, let us start the program.&lt;br /&gt;
|-&lt;br /&gt;
|0:19- 0:24 &lt;br /&gt;
|I will create a program that lets you see the  position of a letter in the English &lt;br /&gt;
alphabet.&lt;br /&gt;
|-&lt;br /&gt;
|0:26- 0:32 &lt;br /&gt;
|For example, if I give the value 1, it should echo out &amp;quot;A&amp;quot; in position 1.&lt;br /&gt;
|-&lt;br /&gt;
|0:33- 0:37 &lt;br /&gt;
|If I give the value two it would say &amp;quot;B&amp;quot; in position 2. &lt;br /&gt;
|-&lt;br /&gt;
|0:38- 0:42 &lt;br /&gt;
|And for three, it will say  &amp;quot;C&amp;quot; is in position 3, and so on.&lt;br /&gt;
|-&lt;br /&gt;
|0:43- 1:45 &lt;br /&gt;
|First I will create my own array.&lt;br /&gt;
|-&lt;br /&gt;
|0:53- 0:57 &lt;br /&gt;
|And just for easy viewing, I will bring this down.&lt;br /&gt;
|-&lt;br /&gt;
|0:58- 1:00 &lt;br /&gt;
|You are welcome going to do so yourself.&lt;br /&gt;
|-&lt;br /&gt;
|1:01- 1:06 &lt;br /&gt;
|And inside. I will create my own array, which I will call ‘ABC’.&lt;br /&gt;
|-&lt;br /&gt;
|1:10- 1:11 &lt;br /&gt;
|That will be the array.&lt;br /&gt;
|-&lt;br /&gt;
|1:15- 1:20 &lt;br /&gt;
|Instead of putting a value here, as we did before, we have an array inside.&lt;br /&gt;
|-&lt;br /&gt;
|1:24- 1:31 &lt;br /&gt;
|And inside these, will be the values, for example, Capital A, B, C and D.&lt;br /&gt;
|-&lt;br /&gt;
|1:32- 1:35 &lt;br /&gt;
|These values are separated by commas.&lt;br /&gt;
|-&lt;br /&gt;
|1:51- 1:56 &lt;br /&gt;
|And then we type “123” and that is equal to an array.&lt;br /&gt;
|-&lt;br /&gt;
|1:45- 1:50 &lt;br /&gt;
|Now we’re just going to have ‘1,2,3,4, and that’s it.&lt;br /&gt;
|-&lt;br /&gt;
|1:53- 1:58 &lt;br /&gt;
|Down here, I’ll show you how to echo out specific data inside the array.&lt;br /&gt;
|-&lt;br /&gt;
|1:59-2:01 &lt;br /&gt;
|We’ll call our main array.&lt;br /&gt;
|-&lt;br /&gt;
|2:03- 2:04 &lt;br /&gt;
|And we’ll call this array as well.&lt;br /&gt;
|-&lt;br /&gt;
|2:05- 2:12 &lt;br /&gt;
|And then the position of what you want inside the array. So it’s an array inside an array.&lt;br /&gt;
|-&lt;br /&gt;
|2:13-2:18&lt;br /&gt;
|So I will type ‘echo’ and then ‘alpha’ which is our main array.&lt;br /&gt;
|-&lt;br /&gt;
|2:19- 2:22&lt;br /&gt;
|And then inside square brackets, ‘ABC’.&lt;br /&gt;
|-&lt;br /&gt;
|2:23- 2:29 &lt;br /&gt;
|And next, inside square brackets, the position of the element you want to retrieve.&lt;br /&gt;
|-&lt;br /&gt;
|2:28- 2:34 &lt;br /&gt;
|Now, for example, is going to echo &amp;quot;A&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|2:35- 2:44&lt;br /&gt;
|Let us give that a run - and we got &amp;quot;A&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|2:47- 2:51 &lt;br /&gt;
|Changing this to ‘123’, will hopefully give us &amp;quot;1&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|2:54- 2:56 &lt;br /&gt;
|As you can see here.&lt;br /&gt;
|-&lt;br /&gt;
|2:57-3:04 &lt;br /&gt;
|So we've made our two basic arrays inside our main arrays, and we’ve learnt to call it.&lt;br /&gt;
|-&lt;br /&gt;
|3:05- 3:11 &lt;br /&gt;
|Now I’m going to create a new program to find out the position of a letter in relation to its number.&lt;br /&gt;
|-&lt;br /&gt;
|3:13- - 3:26 &lt;br /&gt;
|I’m going to type up here ‘ postion = 0’, since 0 is the beginning.&lt;br /&gt;
|-&lt;br /&gt;
|3:30- 3:35&lt;br /&gt;
|Now I will echo out ‘Letter something is in position something’.&lt;br /&gt;
|-&lt;br /&gt;
|3:39- 3:40&lt;br /&gt;
|This is quite simple.&lt;br /&gt;
|-&lt;br /&gt;
|3:42- 3:51&lt;br /&gt;
|We enter a position here, say 3. Since C is in position 3 in the alphabet, we get C.&lt;br /&gt;
|-&lt;br /&gt;
|3:53- 3:59&lt;br /&gt;
|So , to echo out our letter, if I am going to replace the first blank with ‘alpha’.&lt;br /&gt;
|-&lt;br /&gt;
|4:02- 4:03 &lt;br /&gt;
|ABC&lt;br /&gt;
|-&lt;br /&gt;
|4:05- 4:06 &lt;br /&gt;
|'pos'&lt;br /&gt;
|-&lt;br /&gt;
|4:07- 4:09 &lt;br /&gt;
|as 'pos' represents our position.&lt;br /&gt;
|-&lt;br /&gt;
|4:11- 4:17 &lt;br /&gt;
|So then, the position will be - Alpha...  123&lt;br /&gt;
|-&lt;br /&gt;
|4:19- 4:22 &lt;br /&gt;
|And then the position, ‘pos’.&lt;br /&gt;
|-&lt;br /&gt;
|4:23- 4:26&lt;br /&gt;
|At the moment, position is equal to 0.&lt;br /&gt;
|-&lt;br /&gt;
|4:29- 4:35 &lt;br /&gt;
|We type ’echo something’. So this is position zero.&lt;br /&gt;
|-&lt;br /&gt;
|4:36- 4:46--??&lt;br /&gt;
|Position zero inside the internal array “ABC”. So in actual fact, we are saying that A is in position 0,&lt;br /&gt;
|-&lt;br /&gt;
|4:47- 4:55&lt;br /&gt;
|which is this array, 123 and that is position zero. So actually we are saying that letter A is in position one.&lt;br /&gt;
|-&lt;br /&gt;
|4:55- 5:04&lt;br /&gt;
|Lets run this. Okay. A is in position 1. Let’s change this to 1.&lt;br /&gt;
|-&lt;br /&gt;
|5:05- 5:17&lt;br /&gt;
|Refresh. Letter B is in position 2. Now what I will do to make this application fully functional and easy to navigate, is eliminate the necessity to write zero for 1.&lt;br /&gt;
|-&lt;br /&gt;
|5:21- 5:29&lt;br /&gt;
|So I will put ‘-1’ at the end and  put 1 in brackets for better legibility.&lt;br /&gt;
|-&lt;br /&gt;
|5:30- 5:44&lt;br /&gt;
|So, position one minus one is infact zero. So, writing 1 will give the same result as 0. Writing 2 will give us the same result as writing 1... So letter B is in position 2.&lt;br /&gt;
|-&lt;br /&gt;
|5:44- 6:01&lt;br /&gt;
|So if I put 1 we get A is in position 1.  If I put zero here; there is no position -1; so we get “letter in position”. So we don’t have the letter or the position.&lt;br /&gt;
|-&lt;br /&gt;
|6:02 onwards&lt;br /&gt;
|So, I’ve made that a bit more user-friendly. Thanks for watching!&lt;/div&gt;</summary>
		<author><name>Chandrika</name></author>	</entry>

	</feed>