I have an array like:
$arr = array("a.b" => "a.b", "b.c" => "b.c");
When i print this it simply displays
Array ( [a.b] => a.b [b.c] => b.c )
But when i use a loop to use the key and value in checkbox name and values like:
<form action="" method="post">
<ul>
<?php
foreach($arr as $k => $v){?>
<li><input type="checkbox" name="<?php echo $v;?>" value="<?php echo $k;?>"><?php echo $v;?></li>
<?php }?>
</ul>
<input name="sub" type="submit"/>
</form>
When i press the submit button the result shows like:
Array ( [a_b] => a.b [b_c] => b.c [sub] => Submit )
Look at the output array, the keys are changed, The dot(.) replaces with _.
Why this happen??