[pmwiki-users] php match q
noskule
noskule at gmx.net
Tue Jul 10 13:34:40 CDT 2007
noskule schrieb:
> I tried:
>
>
> (:expr <expression> <string>:)
>
> exapmles:
> (:expr 'FieldA' '{$showfields}':)
>
> something like this shouls work to:
> (:expr '^FieldA' '{$showfields}':)
>
>
> $Conditions['expr'] = 'CompareArgs($condparm) == 0';
>
> function CompareArgs($arg) {
> $arg = ParseArgs($arg); return preg_match(@$arg[''][0], @$arg[''][1]);
> }
>
> but i get the error: Cannot redeclare compareargs() (previously declared
> in .....
>
oky the error is gone, but now the hole page ist emty :-(, anyone an idea?
$Conditions['expr2'] = 'CompareArgs2($condparm) == 0';
function CompareArgs2($arg) {
$arg = ParseArgs2($arg); return preg_match(@$arg[''][0], @$arg[''][1]);
}
>
>
>
> noskule schrieb:
>> hi list
>> I would like to find out if a string occurs in a value and tried the
>> match condition
>>
>> $showfields = FieldAFieldBFieldC
>>
>>
>> (:if match '{$sowhfields}' FieldA:)
>> ...formfield
>> (:if match '{$sowhfields}' FieldB:)
>> ...formfield
>>
>>
>> is there a way how to do it?
>>
>> so far I tested with the match condition it isn't possible to use an
>> expression instead of a value.
>> if this don't work I also could define one, but witch one do I have to use?
>>
>> thanks for any hints
>> grz nos
>>
>> _______________________________________________
>> pmwiki-users mailing list
>> pmwiki-users at pmichaud.com
>> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>>
>
More information about the pmwiki-users
mailing list