Scusate, ho trovato l'errore...

Avevo scritto (result != "")... senza il dollaro..


Apparte che ho scoperto che se non trovo niente $result non è nullo... che devo scrivere?