Dominique Faure schrieb:
> On Thu, Oct 2, 2008 at 21:32, noskule <[EMAIL PROTECTED]> wrote:
>   
>> 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
>>
>>     
>
> Perhaps:
>
>   foreach ($skinsection_ptv_arr as $ptvname => $val ) {
>     $FmtPV['$' . $ptvname] = "'$val'";
>   }
>
>   
yep, or     $FmtPV["$$ptvname"] = "'$val'"; did the trick
thanks




_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to