데이터를 수신 한 다음 배열에 넣는 프로그램이 있습니다. 내가 머리카락을 뽑아 내고 몇 시간이 지나면 "groupID"필드가 지나간 것으로 나타나지만 (다음 줄에) 발견되지 않은 것으로 인식되는 이유 때문에 식별 할 수없는 이유가 있습니다.배열에 어떤 문제가 있습니까?
이session_start(); // Start session first thing in script
// Script Error Reporting
error_reporting(E_ALL);
ini_set('display_errors', '1');
echo "what we sent: " ;
print_r($_GET);
$groupId = $_GET['groupId'];
$GroupName = $_GET['GroupName'];
$Price = $_GET['Price'];
$_SESSION["cart_array"] = array(
0 => array(
"groupId" => $groupId,
"GroupName" => $GroupName,
"Price" => $Price
) //array
); //array
echo "<br />";
print_r ($_SESSION["cart_array"]);
은 다음 프로그램의 출력이 될 때 : 우리가 보낸 무엇 :
Array ([newvalue] => 1 [theData] => groupId=1 [GroupName] => Urban Textures [StylePatternColor] => RBN TXTRS [KitDescription] => [StandardPutUp] => 270 [Price] => 1485 [Discount] => 1417 [DiscountNote] => 1 [Kit] => True [Quantity] => 1)
Notice: Undefined index: groupId in /home/acmeco5/public_html/AcmeComputingCart/cartUpdaterSimplified.php on line 10
Array ([0] => Array ([groupId] => [GroupName] => Urban Textures [Price] => 1485))
주목하라의 groupId가 있으로 $_GET
에 표시하는 것이 여기에 코드입니다 값은 1이지만 다음 행에서는 정의되지 않습니다.
내가 뭘 잘못하고 있니?
미리 도움을 주셔서 감사합니다.
'[theData] =>의 groupId = 1'이 오타 나 무엇인가? –