title: What's the difference between $var[] = array() and $var = array()?
body: <p>When I wrote <code>$var = array('index' =&gt; 'some value')</code>, it showed me an error when displaying a form on a page on the browser: </p>
  
  <p><code>Notice: Undefined offset: 0 in C:\xampp\htdocs\learn\php\admin\authors\form.html.php on line 28.</code></p>
  
  <p>But when I wrote it like this <code>$var[] = array('index' =&gt; 'some value')</code>, it showed the page perfectly. So I have to put [] after variable name. In my knowledge, I can create an array variable like this <code>$var = array(some array)</code>.</p>
  
  <p>So actually what is the difference between those two? </p>