Over a million developers have joined DZone.

Pass Variable As Hidden

·
pass variable as hidden field
recursively handles array
eg usage: 
foreach ($_REQUEST as $key => $val) 
  pass_hidden($key, $val);
 
function pass_hidden($key, $val) {
  if (is_array($val)) {
    foreach ($val as $k => $v) 
      pass_hidden("{$key}[{$k}]", $v);
  } else {
    ?>
    
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}