[pmwiki-users] define $FmtPV via foreach

noskule noskule at gmx.net
Thu Oct 2 14:32:54 CDT 2008


hi list
I try to define page variables out of an array:

$skinsection_ptv_arr = array(
"SectionA" => 1,
"SectionB" => 0,
...
);

foreach ( $skinsection_ptv_arr as $ptvname => $val ) {
  $FmtPV['${$ptvname}]' = "'$val'";
  }

I cant figure out the right syntax for the variable name in $FmtPV,
anyone a suggestion

thanks nos



More information about the pmwiki-users mailing list