<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Complete Tutorial of Arrays Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/complete-tutorial-of-arrays/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/complete-tutorial-of-arrays/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Thu, 05 Aug 2021 12:54:01 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>Complete Tutorial of Associative Arrays</title>
		<link>https://www.scmgalaxy.com/tutorials/complete-tutorial-of-associative-arrays/</link>
					<comments>https://www.scmgalaxy.com/tutorials/complete-tutorial-of-associative-arrays/#respond</comments>
		
		<dc:creator><![CDATA[Ashwani Kumar]]></dc:creator>
		<pubDate>Thu, 05 Aug 2021 12:54:00 +0000</pubDate>
				<category><![CDATA[php]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[Array operators]]></category>
		<category><![CDATA[Associative Arrays]]></category>
		<category><![CDATA[Complete Tutorial of Arrays]]></category>
		<category><![CDATA[Creating an associative array]]></category>
		<category><![CDATA[Features of Associative Arrays]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[Some Features of Associative Arrays]]></category>
		<category><![CDATA[Traversing the Associative Array]]></category>
		<category><![CDATA[Tutorial for Array operators]]></category>
		<category><![CDATA[What]]></category>
		<category><![CDATA[What is Associative Arrays]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=7453</guid>

					<description><![CDATA[<p>What is Associative Arrays? Key value pairs are stored in associative arrays. For example, a numerically indexed array might not [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/complete-tutorial-of-associative-arrays/">Complete Tutorial of Associative Arrays</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">What is Associative Arrays?</h2>



<p class="wp-block-paragraph">Key value pairs are stored in associative arrays. For example, a numerically indexed array might not be the ideal choice for storing a student&#8217;s marks from several subjects in an array. Instead, we might use the names of the subjects as the keys in our associative array, with their appropriate marks as the value.</p>



<p class="wp-block-paragraph"><strong>Example:-</strong></p>



<script src="https://gist.github.com/AdarshAshwani/dfae25be6f36c8b7aa40b371990b522c.js"></script>



<p class="wp-block-paragraph"><strong>Output:</strong>&#8211;</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img fetchpriority="high" decoding="async" width="444" height="174" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-39.png" alt="" class="wp-image-7457" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-39.png 444w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-39-300x118.png 300w" sizes="(max-width: 444px) 100vw, 444px" /></figure></div>



<h3 class="wp-block-heading">Some Features of Associative Arrays?</h3>



<p class="wp-block-paragraph">Associative arrays are similar to numeric arrays in appearance, but differ in terms of index. An associative array&#8217;s index is a string that establishes a strong relationship between key and value.</p>



<p class="wp-block-paragraph">For storing employee wages in an array, a numerically indexed array is not the ideal choice. Instead, you may create an associative list with the workers&#8217; names as keys and their salary as the value.</p>



<ul class="wp-block-list"><li>The variable&#8217;s name is &#8220;$variable name…&#8221;, the element&#8217;s access index number is &#8220;[&#8216;key name&#8217;],&#8221; and the array element&#8217;s value is &#8220;value.&#8221;</li><li>Consider the following scenario: you have a group of people and want to assign gender to each of them based on their names.</li><li>You may achieve this by using an associative list.</li><li>You can do so by using the code below.</li></ul>



<h4 class="wp-block-heading"><strong>Traversing the Associative Array</strong>:-</h4>



<p class="wp-block-paragraph">Loops may be used to go over associative arrays. The associative array can be looped through in two different ways. Using the for loop first, and then the foreach loop second.</p>



<p class="wp-block-paragraph"><strong>Example:-</strong></p>



<p class="wp-block-paragraph">In this case, the array keys() function is used to identify indices with provided names, and the count() method is used to count the number of indices in associative arrays.</p>



<script src="https://gist.github.com/AdarshAshwani/587ce0731aeac39c67296144ec7ae2de.js"></script>



<p class="wp-block-paragraph"><strong>Output:-</strong></p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img decoding="async" width="559" height="362" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-40.png" alt="" class="wp-image-7458" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-40.png 559w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-40-300x194.png 300w" sizes="(max-width: 559px) 100vw, 559px" /></figure></div>



<h4 class="wp-block-heading"><strong>Creating an associative array of mixed types</strong>:-</h4>



<script src="https://gist.github.com/AdarshAshwani/a46ba22f51b28c585cb00fac1b8c4dc0.js"></script>



<p class="wp-block-paragraph"><strong>Output:-</strong></p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img decoding="async" width="342" height="111" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-41.png" alt="" class="wp-image-7459" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-41.png 342w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-41-300x97.png 300w" sizes="(max-width: 342px) 100vw, 342px" /></figure></div>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/complete-tutorial-of-associative-arrays/">Complete Tutorial of Associative Arrays</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/complete-tutorial-of-associative-arrays/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Complete Tutorial of Numeric Array</title>
		<link>https://www.scmgalaxy.com/tutorials/complete-tutorial-of-numeric-array/</link>
					<comments>https://www.scmgalaxy.com/tutorials/complete-tutorial-of-numeric-array/#respond</comments>
		
		<dc:creator><![CDATA[Ashwani Kumar]]></dc:creator>
		<pubDate>Wed, 04 Aug 2021 13:34:30 +0000</pubDate>
				<category><![CDATA[php]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[Complete Tutorial]]></category>
		<category><![CDATA[Complete Tutorial of Arrays]]></category>
		<category><![CDATA[Complete Tutorial of Numeric Array]]></category>
		<category><![CDATA[How]]></category>
		<category><![CDATA[How to declare and initialize an array]]></category>
		<category><![CDATA[Numeric Array]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[What]]></category>
		<category><![CDATA[What is Numeric Array]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=7412</guid>

					<description><![CDATA[<p>What is Numeric Array? Numeric arrays allow us to store numerous values of the same data type in a single [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/complete-tutorial-of-numeric-array/">Complete Tutorial of Numeric Array</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">What is Numeric Array?</h3>



<p class="wp-block-paragraph">Numeric arrays allow us to store numerous values of the same data type in a single variable rather than creating multiple variables for each value. These values can then be accessed using an index, which is always a number in numeric arrays.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="652" height="372" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-34.png" alt="" class="wp-image-7414" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-34.png 652w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-34-300x171.png 300w" sizes="auto, (max-width: 652px) 100vw, 652px" /></figure></div>



<h3 class="wp-block-heading">How to declare and initialize an array?</h3>



<p class="wp-block-paragraph">There are two ways to create an array. Let’s take a look at both these ways in the Following example:</p>



<script src="https://gist.github.com/AdarshAshwani/fae817aba55920fb3d8a175fc86cf592.js"></script>



<h4 class="wp-block-heading">1. Accessing the elements</h4>



<p class="wp-block-paragraph">You must know the index value of an array&#8217;s items in order to access them.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="638" height="295" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-33.png" alt="" class="wp-image-7413" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-33.png 638w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-33-300x139.png 300w" sizes="auto, (max-width: 638px) 100vw, 638px" /></figure></div>



<p class="wp-block-paragraph"><strong>Example:-</strong></p>



<script src="https://gist.github.com/AdarshAshwani/e876567a90eaf1c20a4f0f8b85c42b34.js"></script>



<h4 class="wp-block-heading">2. Length of an array</h4>



<p class="wp-block-paragraph">The in-built function <code><strong><span class="has-inline-color has-vivid-red-color">count </span></strong></code>can be used to count the length of an array, or the number of elements in the array.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="549" height="338" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-35.png" alt="" class="wp-image-7415" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-35.png 549w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-35-300x185.png 300w" sizes="auto, (max-width: 549px) 100vw, 549px" /></figure></div>



<p class="wp-block-paragraph"><strong>Example:-</strong></p>



<script src="https://gist.github.com/AdarshAshwani/131b4c66bed53abd0c48f3b0404710ce.js"></script>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/complete-tutorial-of-numeric-array/">Complete Tutorial of Numeric Array</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/complete-tutorial-of-numeric-array/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Complete Tutorial of Arrays</title>
		<link>https://www.scmgalaxy.com/tutorials/complete-tutorial-of-arrays/</link>
					<comments>https://www.scmgalaxy.com/tutorials/complete-tutorial-of-arrays/#respond</comments>
		
		<dc:creator><![CDATA[Ashwani Kumar]]></dc:creator>
		<pubDate>Wed, 04 Aug 2021 13:14:18 +0000</pubDate>
				<category><![CDATA[php]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[Array operators]]></category>
		<category><![CDATA[Complete]]></category>
		<category><![CDATA[Complete Tutorial of Arrays]]></category>
		<category><![CDATA[How many types of Array]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[Some Array Operators]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=7404</guid>

					<description><![CDATA[<p>What is Array? Arrays are collections of data elements with a common name. Arrays provide a framework for defining and [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/complete-tutorial-of-arrays/">Complete Tutorial of Arrays</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">What is <strong>Array</strong>?</h3>



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" src="https://slideplayer.com/slide/9578761/31/images/2/What+is+Array.jpg" alt="Arrays. - ppt download"/></figure></div>



<p class="wp-block-paragraph">Arrays are collections of data elements with a common name. Arrays provide a framework for defining and accessing several data elements with a single identity, making data administration easier.</p>



<p class="wp-block-paragraph">When dealing with several data elements, we use array.</p>



<h3 class="wp-block-heading">How many types of Array?</h3>



<ul class="wp-block-list"><li><strong>Numeric/Indexed Array</strong>:- In this array index will be represented by a number. By default numeric array index start from 0.<br><strong>Example:-</strong><code><span class="has-inline-color has-vivid-red-color"><strong> $num [0] = “ScmGalaxy”;</strong></span></code></li><li><strong>Associative Array</strong>:- In this Array index/key will be represented by a string.<br><strong>Example:-</strong> <strong><code><span class="has-inline-color has-vivid-red-color">$fees [“ScmGalaxy”] = 500;</span></code></strong></li><li><strong>Multidimensional Array</strong>:- Arrays of Arrays is known as multidimensional arrays.<br><strong>Example:-</strong> <strong><code><span class="has-inline-color has-vivid-red-color">$num [0] [0] = 25;</span></code></strong></li></ul>



<h3 class="wp-block-heading">Some Array Operators are :-</h3>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="889" height="389" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-32.png" alt="" class="wp-image-7409" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-32.png 889w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-32-300x131.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/image-32-768x336.png 768w" sizes="auto, (max-width: 889px) 100vw, 889px" /></figure></div>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/complete-tutorial-of-arrays/">Complete Tutorial of Arrays</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/complete-tutorial-of-arrays/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
