Home » Web Design » Web Design – Testing Echo Hello World Snippet

Web Design – Testing Echo Hello World Snippet

This sample is using the Plugin “PHP Code for posts”. The link is found here.

php-helloworldsnippet

Note this plugin works similar to Watu Quizzes. You create your PHP code within the plugin, which provides you “snippets”, or shortcodes. You then past the short code in your WordPress post or page.

PHP is Fun!

Hello world!
I'm about to learn PHP!
This string was made with multiple parameters.

The outcome of this initial php code is above, php snippet=1.

echo “<h2>PHP is Fun!</h2>”;
echo “Hello world!<br>”;
echo “I’m about to learn PHP!<br>”;
echo “This “, “string “, “was “, “made “, “with multiple parameters.”;

The echo is PHP code to send out or display to the end user. In our above code, we see PHP is simply displaying the HTML and string values within the double quotes.


Leave a comment

Your email address will not be published. Required fields are marked *