Is there any explanation why this " %_ " and "Square Bracket" is used ? i cant proceed without knowing this, Thanks in advance .
Asked
Active
Viewed 89 times
-2
-
`$_POST` is an associative array. As per language design, you access the elements of such an array with the square bracket syntax: `$_POST["key"]`. – domsson Apr 16 '17 at 22:36
-
1RTM http://php.net/manual/en/language.variables.superglobals.php – Funk Forty Niner Apr 16 '17 at 22:37
-
*"Is there any explanation why this " %_ ""* - %_ is perl http://stackoverflow.com/questions/32846792/what-is-in-perl – Funk Forty Niner Apr 16 '17 at 22:38
2 Answers
0
$_
variables
Built-in variables that begin with $_
are so-called superglobals:
Superglobals are built-in variables that are always available in all scopes
[]
syntax
$_POST
is an associative array. As per the language design, accessing elements of such an array is performed via the square bracket notation:
echo $_POST["key"];

domsson
- 4,553
- 2
- 22
- 40
-
OP: *"Is there any explanation why this " %_ ""* - and not `$_` unless that was a typo on their part; to which the duplicates cover all these. – Funk Forty Niner Apr 16 '17 at 22:41
-
@Fred-ii- I'd assume it was a typo, seeing how the title refers to `$_POST`. But yeah, question is a duplicate anyway, what am I even doing here. :) – domsson Apr 16 '17 at 22:42
-
0
My explanation is: $_ and Square Bracket are part of the syntax. Every language has syntax = rule of writing. Authors of a programming language are authors of the syntax.

b2ok
- 544
- 6
- 13