How to display stored array from sql database

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";
}

Answers


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);
}

Need Your Help

Error with MapView

android map

I don't know what I did wrong, since this does not work and log cat show an error as shown below. I tried with different codes but still I get this error. Would anyone help me with this error?