can you provide some more details aside from "it doesn't work"?
have you created a test php page in the MAMP root.
crate a php page named phpinfo.php that contains the following:
<?php phpinfo(); ?>
save that page to the mamp root and try to view that page in a browser:
localhost/phpinfo.php
what happens?