Php $_POST[] method not working with certain input name
<p>I am working on a form and it looks like this</p>

<pre><code>&lt;form name="project" method="post" action="result.php"&gt;
   Address: &lt;input name="address[line1]" type="text"/&gt;
&lt;/form&gt;
</code></pre>

<p>In the result.php, I use the following code to get the input</p>

<pre><code>&lt;?php echo (isset ($_POST['address[line1]') ?  $_POST ['address [line1]'] : 'fail') ?&gt;
</code></pre>

<p>However, I keep getting 'fail' on my page instead of catching the input address[line1], and the strange thing is when I change the name to "addressLine1" it works perfectly, can anyone advise me on this? </p>

<p>I am new to web development and I am pretty confused now.</p>
