Posting as answer then so we can mark this question complete.
Different PHP configuration perhaps? http://php.net/manual/en/security.magicquotes.what.php
Magic quotes can cause this problem. Differences between WAMP and MAMP are much less common than server configuration differences between two servers. Usually if code works on one and not the other, there are differences in your Apache or PHP configuration.