file - a.php
ここでremarkable point は “?” の使用。
The "?" question mark in this case has nothing to do with PHP at all. This is a format that the URL uses to seperate the URI path and defined parameters. The amperstand "&" is used to delimit each defined parameter key. The hash "#" is used at the end of an URL to assign the anchor point of the landing page.
http://www.domain.com/path/page.html?parameter1=value1¶meter2=value2#anchor
Color Key:
protocol
domain
path
file
parameter
value
anchor
http://www.domain.com/path/page.html?parameter1=value1¶meter2=value2#anchor
Color Key:
protocol
domain
path
file
parameter
value
anchor
つまり、file b.phpのparameterの値(ここでは“id”となってるけど恐らくこれが “get” のparameter やな。 fileで何と定義するかによって違ってくるんだろうな)に $item_id を突っ込むぞ、anchorの“remove”を押したら って意味だな
ちなみに、従来の “?” の使用例は↓
count = $a > $b ? $b : $a;
is the same as the following code:
if ($a > $b)
count = $b;
else
count = $a;
is the same as the following code:
if ($a > $b)
count = $b;
else
count = $a;
で冒頭の &_get の話に戻って、file b.php で $_GET["id"] として”id” を取り出せるワケヨ。
