"unexpected '['" error in PHP
<p>I have following process.php file:</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;title&gt; Form Processing  &lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;?php
  //  print _r($_POST)
  $arr=array
  (
  "ana" =&gt; "ana123",
  "gogi"=&gt;"2345",
  "vano"=&gt;"3at4"
  );

  $username=$_POST['username'];
  $password=$_POST['password'];
  if(arr[$username] == $password){
  echo " you entered  correct input  for ana ";
  }
  else
  {
  echo " try again "; 

  }

  ?&gt;
  &lt;/body&gt;
  &lt;/html&gt;
</code></pre>

<p>When i run this code,it wrote:</p>

<pre><code>Parse error: syntax error, unexpected '[' in C:\xampp\htdocs\datuna\process.php
on line 17
</code></pre>

<p>but where is missed [ i could not understand,i am trying to check if user entered correct   username and password, here is also this file if you need it:</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;FORMS&lt;/title&gt;
&lt;/head&gt;     
&lt;body&gt;
&lt;form action="process.php" method="post"&gt;
Username : &lt;input type=text  name=username  value="" /&gt; &lt;br/&gt;
Password : &lt;input type=password   name=password value="" /&gt;&lt;br/&gt;
&lt;input type="submit" name=submit value=submit /&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt; 
</code></pre>
