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.
- 1. In PHP you will always start with a tag the looks like this. <?php
- 2. Then you will always have to close your php tag with this ?>
- 3. 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.
- 4. 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 ….’;”
- 5. 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.
- 6. Then click the Parse PHP button
- 7. Congratulations you wrote a PHP code that echo’s out into a browser. Simple right? Lets have some more fun.
- 8. Write this code echo “My name is Max <br/> I work at A1WebsitePro <br/> I am a web developer”;
- 9.The <br/> tags are called “Line Breaks” that makes whatever you put after that tag will go on the next line.
- 10. 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>”;
- 11. 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 parse our PHP is http://phpcodepad.com/
I hope you enjoyed the article. If I was able to help you please consider a tip for the content.
One Time Tip