I am having an strange issue while transversing array, created by html input. Here is my html:
<input type="hidden" name="new_date['rule'][]" value="hfgfgfgfg">
<input type="date" name="new_date['date'][]" />
if I submit form then I get array like this:
$var=$_POST['new_date'];
echo"<pre>";
print_r($var);
echo"</pre>";
//output
Array
(
['rule'] => Array
(
[0] => rule_5a6c50ff02fff
)
['date'] => Array
(
[0] => 2018-05-24
)
)
if I am trying the array with key rule then I am getting nothing or empty.
print_r($var['rule']);
//output
.....empty......
Please help. TIA
$var["'rule'"]