Skip to content
Advertisement

PHP – Click button to show array

I pretty new at PHP (also my first question here).

I have created a button, when you click on it I want the values in an array to show up on the page. (And would also like the values to show up randomly everytime you click on the button if possible.)

I do not want to use any JavaScript, only PHP, HTML and CSS. Any help highly appreciated!

JavaScript

Advertisement

Answer

You can put a if() condition to check the name posted and if yes it echoes the array

You can try the following

JavaScript

Note : Assign the second Submit with capital S after the operator.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement