Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 35501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T14:14:45+00:00 2026-05-10T14:14:45+00:00

foreach ($_GET as $field => $label) { $datarray[]=$_GET[$field]; echo $_GET[$field]; echo <br>; } print_r($datarray);

  • 0
foreach ($_GET as $field => $label) {    $datarray[]=$_GET[$field];    echo '$_GET[$field]';    echo '<br>'; } print_r($datarray); 

This is the output I am getting. I see the data is there in datarray but when I echo $_GET[$field]

I only get ‘Array’

But print_r($datarray) prints all the data. Any idea how I pull those values?

OUTPUT

Array (          [0] => Array (                   [0] => Grade1                   [1] => ln                   [2] => North America                   [3] => yuiyyu                   [4] => iuy                   [5] => uiyui                   [6] => yui                   [7] => uiy                   [8] => 0:0:5                   )  ) 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T14:14:45+00:00Added an answer on May 10, 2026 at 2:14 pm

    EDIT: When I completed your test, here was the final URL:

    http://hofstrateach.org/Roberto/process.php?keys=Grade1&keys=Nathan&keys=North%20America&keys=5&keys=3&keys=no&keys=foo&keys=blat&keys=0%3A0%3A24

    This is probably a malformed URL. When you pass duplicate keys in a query, PHP makes them an array. The above URL should probably be something like:

    http://hofstrateach.org/Roberto/process.php?grade=Grade1&schoolname=Nathan&region=North%20America&answer%5B%5D=5&answer%5B%5D=3&answer%5B%5D=no&answer%5B%5D=foo&answer%5B%5D=blat&time=0%3A0%3A24

    This will create individual entries for most of the fields, and make $_GET[‘answer’] be an array of the answers provided by the user.

    Bottom line: fix your Flash file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There are a few posts about this, but after hours of searching I still
Is there a foreach structure in MATLAB? If so, what happens if the underlying
I had a little but unpleasant problem with symfony2 Field component. For example, I
I'm completely open on how to do this: I have the line: echo implode(',
How do I get the key of the current element in a foreach loop
I'm trying get values from a GridView using the following code: foreach (GridViewRow row
foreach($arrayOne as $value){ do function } In the above example, I'd like to pass
When foreach ing through a generic list I often want to do something different
I have a 'foreach' macro I use frequently in C++ that works for most
I have following foreach-loop: using System.IO; //... if (Directory.Exists(path)) { foreach(string strFile in Directory.GetFiles(path,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.