Custom Search
|
|
What Do You Need To Know To Create Php Simple Code
As pointed out earlier, PHP is a server-side scripting language. It means that, although your users will not need to install new software, you need to have PHP installed on your web host server. It should be integrated as part of your package but in the event you don't know if it is installed you can check and find it out using the sample code below. If your server doesn't support PHP you can ask them to install it for you since it is free to download and install. Along with the PHP you'll need a server such as APACHE. Also take note that PHP could run in any platform such as windows or linux. MYSQL is optional though. But most PHP utilizes MYSQL as its database. It most scenarios if you would require PHP you can find some packages that has every one of the components needed like linux, apache, mysql and php which stands for LAMP. Writing PHP code is actually very simple. No need for any specific software, except for a text editor (like Notepad in Windows) as simple as that or you can also download other php editor with some extra extra features to it which can be very helpful as a tool. Save and run the file on your browser and you have your php code. Let’s evaluate the sample code below. A PHP code is at all times enclosed with open and close tags ‘’. The following line we have a variable initialization of $var with ‘hi’ as a value. In contrast to other languages which you'll need to declare the variable initially before you can use it. In PHP you can use the variable instantly without declaring it. And as you notice at the end of the 1st line we've got ‘;’ semi-colon that indicates the end of the statement like on C Language. Now let’s go to the next line. Here we have simply echo the string ‘hello earth’ which will print it out or show on the browser. And after that line we have the variable $var initialize earlier which contains the value string ‘hi’ as being printed out identical as the previous line. On the last line, we have the function phpinfo() which will print out the server information of php, apache, and mysql as stated earlier. So there you go as easy as the codes above you now have your php simple code. You simply need to practice and attempt other codes with some use of functions and later on you’ll find yourself developing more difficult code beneficial for any purpose you are going to need. Article Directory: http://www.articledashboard.com Discover How It is possible to Learn PHP simple code In Less Than 30 Days! This Totally free Special Report will get you started |
|
© 2005-2011 Article Dashboard