Answer #1: PHP operates on the server side. Javascript operates on the client side.
Assume your web site is hosted in Chicago but your users come from all over the world like London, New York, and Paris. You write a file that is HTML mixed with some PHP. Then someone in London requests to see your web site. The first thing that happens is that the web server in Chicago reads your file from its hard drive. Then the web server looks at the PHP code and executes on the Chicago machine it which results in pure HTML. Finally, the Chicago machine sends the pure HTML (minus the PHP) to the user's machine in London.
When the user in London gets the web page, there is no PHP in it so there's no way for the web page to trigger those PHP commands - they don't exist in the pure HTML file that they receive.
You want to include some Javascript in the file. The HTML page that the user in London receives can have actions on buttons that display words when clicked. Since you are interested in displaying words when buttons are clicked, Javascript is probably the best language for you to be using.
Answer #2: For more advanced programmers, Ajax might be the right solution.
You can include Ajax code in your HTML file (the "j" in Ajax stands for Javascript so you're really just including Javascript). When you want the button click to effect some action on the Chicago web server, you can use Ajax so that the button click on the user's machine in London will send a message to the Chicago server that it should "do something".
But if that "something" is to print "blah blah blah" on the user's screen, then it wouldn't make sense to use Ajax because Ajax is going to invoke some action on the Chicago machine.
Therefore, simple Javascript (without Ajax) is probably the right tool for you to invoke an action on the user's machine - unless you have some need for the button click to make something happen on the web server.