<?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>KADIMI &#187; arrays</title>
	<atom:link href="http://www.kadimi.com/en/tag/arrays/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kadimi.com/en</link>
	<description>[Web developper, Linux addict, Technical translator...]</description>
	<lastBuildDate>Tue, 08 May 2012 17:46:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>A note on JavaScript arrays creation &amp; initialization</title>
		<link>http://www.kadimi.com/en/arrays-creation-and-initialization-225</link>
		<comments>http://www.kadimi.com/en/arrays-creation-and-initialization-225#comments</comments>
		<pubDate>Wed, 05 Aug 2009 04:19:01 +0000</pubDate>
		<dc:creator>Nabil</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[arrays]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.kadimi.com/en/?p=225</guid>
		<description><![CDATA[I use PHP a lot in my projects and it happens that sometimes I combine PHP with another language and write completely useless code. PHP arrays can be created and initialized with like this: &#60;?php $cities[] = "mecca"; $cities[] = "medina"; ?&#62; I thought that the same would apply to javascript&#8230; Yes, it can work, [...]]]></description>
			<content:encoded><![CDATA[<p>I use PHP a lot in my projects and it happens that sometimes I combine PHP with another language and write completely useless code.</p>
<p>PHP arrays can be created and initialized with like this:</p>
<blockquote>
<pre><code>&lt;?php
  $cities[] = "mecca";
  $cities[] = "medina";
?&gt;
</code></pre>
</blockquote>
<p>I thought that the same would apply to javascript&#8230; Yes, it can work, but only if the array already exists, otherwise you will get an error, Your browser will tell you that it can&#8217;t find that array, pretty simple&#8230; maybe&#8230;</p>
<blockquote>
<pre><code>var cities = []// we create the array first
  cities[0] = "mecca";
  cities[1] = "medina";
</code></pre>
</blockquote>
<p>Note that JavaScript doesn&#8217;t automatically assign table indexes, you have to set them automatically. +1 for PHP (on most other languages)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kadimi.com/en/arrays-creation-and-initialization-225/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

