The arguments to strpbrk are in the wrong order. Also, this function never returns TRUE, it returns a string when a match is found and FALSE when not - see the documentation: https://www.php.net/manual/en/function.strpbrk.php The corrected code would therefore be:
if (strpbrk($kortingarray['waarde'], $tekens) === FALSE) {
Unfortunately this still won't work because strpbrk
is not aware of different text encodings - it will only work as expected if you use an 8-bit encoding. Your string is most likely encoded in UTF-8, which means you'll get matches for any string that happens to include any of the 3 bytes used to encode €. For example, ₩
is a match.
A working solution is to use preg_match
instead:
if (preg_match('/[€%]/u',$kortingarray['waarde']) === 0) {