Which of the following ways is the right one in using the characters " and ' inside PHP's sub-arrays?
#1 Way in debugging PHP code
$_POST["login['username']"];
#2 My original way in PHP
$_POST['login[username]'];
My code is now broken after changing all my variables to arrays.
The following is the HTML to which the variables refer.
<p>Username:
<input name="login['username']" type="text" cols="92" />
</p>
<p>Email:
<input name="login['email']" type="text" cols="92" />
</p>
<p>Password:
<input name="login['password']" type="password" cols="92" />
</p>
<input type="submit" value="OK" />
</form>
Which one is the right way of the following ways in using arrays in HTML.
#11
<input name="login['password']" type="password" cols="92" />
#22
<input name="login[password]" type="password" cols="92" />
I am at the moment using the ways #1 and #11 unsuccessfully?