PHP for Beginners
So are you looking for some PHP for beginners lessons? Well you have come to the right place. Recently I have been asked to do some of these tutorials because people are curious about how PHP works. I think it is a fascinating thing to learn and if you are curious here is a good place to start with just some simple PHP code. I dont like long drawn out introductions so may be we will get right into it.
- In PHP you will always start with a tag the looks like this. <?php
- Then you will always have to close your php tag with this ?>
- In the box below you will not have to do this because the tag is already provided for you. So this is just for practice.
- In the frame below I want you to highlight the content “/** write your php code and test it online # do not start with php open tag
Please like and google+ to encourge for adding more features */
echo ‘Welcome to PhpCodePad ….’;” - Now what I want you to do is enter this code: echo “Hi There”; NOTE: make sure you type it in, if you try to copy and paste it will not work.
- Then click the Parse PHP button
- Congratulations you wrote a PHP code that echo’s out into a browser. Simple right? Lets have some more fun.
- Write this code echo “My name is Max <br/> I work at A1WebsitePro <br/> I am a web developer”;
- The <br/> tags are called “Line Breaks” that makes whatever you put after that tag will go on the next line.
- Want to have some more fun in PHP? Lets try to make some text bold: echo “<strong>My Name is Max</strong><br/>I am a web developer for A1WebsitePro<br/><strong>Do you like PHP?</strong>”;
- I hope you had some fun with this simple tutorial if you want to practice more with PHP I will have more lessons coming up so subscribe to my feed if you want to keep updated. The website that we are using to execute our PHP is https://www.tutorialspoint.com/execute_php_online.php
PHP for beginners was last modified: October 29th, 2021 by
3 Comments
Awesome! Very easy to follow. Thanks.
Thank You so much! This really helps, and I’ll definitely keep practicing. I hope for more of these awesome tutorials in the future.
You are so epicly cool. 🙂