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

  • Home
  • SEARCH
  • 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 8866867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:53:21+00:00 2026-06-14T16:53:21+00:00

I have the following code: <?php if ( isset($_POST[‘submit’]) ) { // print_r($_POST[‘row’]); //

  • 0

I have the following code:

<?php
if ( isset($_POST['submit']) )
{
    // print_r($_POST['row']); // Works perfectly
    echo $_POST['row[1][2]'];
}
?>


<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<?php 
$num_of_days_in_month=3;
for($i = 1; $i<= $num_of_days_in_month; $i ++) {
for($j = 1; $j <= 4; $j++) {
echo "<input type=\"text\" name=\"row[$i][$j]\" />";
if ($j ==4) {
    echo "<br>";
}
}
}
?>
<input type="submit" name="submit" />
</form>

I am trying to echo row 1, column 2 and the output is blank.

Anyone know why?

Thanks,
Jim

  • 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. Editorial Team
    Editorial Team
    2026-06-14T16:53:22+00:00Added an answer on June 14, 2026 at 4:53 pm

    Your indexing is wrong, try this

    <?php
    if ( isset($_POST['submit']) )
    {
        echo $_POST['row'][1];
        echo $_POST['row'][2];
    }
    ?>
    

    Or

    <?php
    if ( isset($_POST['submit']) )
    {
        echo $_POST['row'][1][2];
    }
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code: <?PHP if (isset($_POST['submit'])) { header(Location: http://mysite.com); } ?> <form
I have the following code: <select name=to class=combo value=' <?php if(isset($_POST['reply'])) { echo <option
I have the following code: <form action= method=POST> <?php $count = isset($_POST['count']) ? $_POST['count']
I have the following PHP code: <?php if(isset($_GET['article'])) { echo <b>success</b>; } ?> And
I have the following code in my file.php file: if (isset($_POST[activate])){ $confirmed = true;
I have following PHP code $val=<div id=user.$row['cid']. userid=.$row['cid']. class=innertxt><img src=images/images.jpg width=50 height=50><strong>.$uname.</strong><ul> <li>Email: .$row['cemail'].</li>
I have the following code validation php script: if(empty($_POST['captcha_code'])) { $error = 1; $code[3]
I have the following code sample upload3.php: <html> <head> <title>PHP Form Upload</title> </head> <body>
I am a PHP newb. I have the following code for a web form.
I have the following html/php/javascript code: <?php $textBox1 = $_POST[textBox1]; ?> <html> <head> </head>

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.