Skip to content

Self-taught PHP is easier than you think

2011 October 22

PHP (Hypertext Preprocessor), which only stood for Personal Home Page back to his childhood, is a power language widely used on the web site design. The backend PHP is a language used to communicate with the server or calculations, etc. to perform this is all done before the user sees the finished web.

Anyone with any knowledge of programming can easily adapt to Rs. It is logical and in my experience, if there is anything that you think it should be feasible, at large. A formidable factor in PHP that many use the opportunity to launch a single pre-written pages in many different php page record, creating a sort of template design possibly server side, so without repeating common aspects of your website. But it’s a small part of PHP, and possibly in many other languages, SSI is not just a PHP functions, although I think more easily with PHP.

Database management is where PHP is a private, quickly and easily connect to the database and easily maniplulation received data makes it perfect for the job. And I’m not just talking about MySQL or other secure database, it can be easy to keep the text-based databases and the like.

So how do you go about teaching yourself this powerful language? It’s easier than you perhaps think with a wealth of knowledge … You guessed it … the World Wide Web. Search for PHP and you’ll soon realize that PHP is one of the best documented language ever found.

PHP extension.php although it can be like any other page. So where do you PHP code? Well it can be anywhere in a normal HTML page when you call index.php instead of index.html. So how can the page know that indeed PHP code and you should interpret them as such?

Quite simply, put all the php code:

or the long format:

So we now know we can take a normal HTML into a PHP page, but what kind of combination of the two users? Here’s a quick example, suppose you have a page that you want to place an image in a database to display. However you can change the location of the database at the beginning of your php page, and then the image area where you can do something like this:

So you can see that you are using PHP command (echo) print the image location ($ _database ['image_location']) in the HTML page before the browser page. And the point is worth clarifying … The end user will not see the PHP code they see an example:

This is because all processing is done server side before the browser view of the HTML content. And also notice the layout of the code,, symbols are used at the end of the statement, it is important to note, as the majority of errors in PHP code comes from forgetting the end of the line characters. You can more than make a statement on the same line as the correct seals are used.

For example, they are all valid:

If (a == 2) echo “excellent”, another echo “nice try”;

If (a == 2) {echo “good” value = $ 1;} else {echo “nice try”, $ value = 2;}

These are NOT valid:

If (a == 2) echo “excellent” echo “nice try”

If (a == 2) echo “excellent”, $ value = 1, another echo “nice try”, $ value = 2;

So finally the PHP language is very easy to use and as long as your code is formatted correctly found little difficulty in learning only with the help of the World Wide Web. Do not forget to look for obvious errors in the structure of the code before you pull your hair out about whats going wrong. And if there should be an easier way to do it … Usually there are 8 out of 10 times.

Take your time, start small and work your way up to the big things. Choose something you want to master every day and know something. You will be surprised how far you have one week or one year to come.

No comments yet

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS