0

This is how I'm storing the array into my database (part of a bigger code):

echo '';

    for ($count = 0; $count < $_GET["entries"]; $count++)
    {
        echo  'Enter a beginning to ending date for the week: <input type="text" name="week"><br/>';
    }

    echo '<input type="submit" name="submit"></form>';

It's within a tag, hence the echo.

I checked my database and I can see the first date, so it is being stored.

This is how I'm displaying my array (doesn't seem to work):

Where am I going wrong? Is it just the output or the input as well? I would really appreciate any suggestions for a possible answer. Thanks.

Current Specific Weeks:

foreach ($currentWeeks as $weeks)
{
    echo "{$weeks}\n";
}

1 Answer 1

1

Try the following

foreach ($currentWeeks as $weeks)
{
    // echo each field from mysql table
    echo $weeks['column_Name'];

   // print all data as array
    print_r($weeks);
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.