PHP if statement with German umlauts [closed]

This is probably because of your database collation. There are numerous questions on StackOverflow about this sort of thing. Your question may get closed or migrated as it’s not on-topic for wordpress.stackexchange.com;

Take a look at this question, or perhaps ask there instead.

Also, why are you not using the WordPress WP_Query class to return posts?