I'm trying to follow This tutorial but being a total novice I'm not totally sure where to put the php.

I am using wordpress so have placed the xthml in the pages>html section. So where do I place the php and how do i call to it?