0

I have table in html code and I want put the table data in multdemensional array. and I have this error:

Undefined offset 0 ...

HTML code:

<td><input type="text" name="col[][]"  /></td>
<td><input type="text" name="col[][]"  /></td>
<td><input type="text" name="col[][]"  /></td>

PHP code:

 for ($k=0; $k<=2; $k++){ 

        for ($l=0; $l<=6; $l++){ //column
            echo $col[$k][$l];
        }
    }
  • 2
    post the *relevant* part of the code... html & php... and try to print_r/var_dump $_POST if its post data – B001ᛦ Jul 16 '18 at 10:18
  • Possible duplicate of [PHP: "Notice: Undefined variable", "Notice: Undefined index", and "Notice: Undefined offset"](https://stackoverflow.com/questions/4261133/php-notice-undefined-variable-notice-undefined-index-and-notice-undef) – JustBaron Jul 16 '18 at 11:13

0 Answers0