This is default featured post 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Thursday, 26 July 2012

PHP Switch Statement - Syntax - Multiple case - Default Case - Example

PHP Switch Statement In the previous lessons we covered the various elements that make up an If Statement in PHP. However, there are times when an if statement is not the most efficient way to check for certain conditions. For example we might have a variable that stores travel destinations and you want to pack according to this destination variable. In this example you might have 20 different locations that you would have to check with a nasty long block of If/ElseIf/ElseIf/ElseIf/... statements. This doesn't sound like much fun to code, let's see if we can do something different. PHP Switch Statement: Speedy Checking With the use...

PHP If...Else Statements - PHP If Statements - Syntex - Example - Output | Conditional statements - Syntex - Code - Example.

Think about the decisions you make before you go to sleep. If you have something to do the next day, say go to work, school, or an appointment, then you will set your alarm clock to wake you up. Otherwise, you will sleep in as long as you like! This simple kind of if/then statement is very common in every day life and also appears in programming quite often. Whenever you want to make a decision given that something is true (you have something to do tomorrow) and be sure that you take the appropriate action, you are using an if/then relationship. The PHP If Statement The if statement is necessary for most programming, thus it is important...

PHP Include Function - Example - Code | PHP Require Function - Example | Difference Between PHP Require Vs Include Function

PHP Include: Without understanding much about the details of PHP, you can save yourself a great deal of time with the use of the PHP include command. include takes a file name and simply inserts that file's contents into the script that issued the include command. An Include Example Say we wanted to create a common menu file that all our pages will use. A common practice for naming files that are to be included is to use the ".php" extension. Since we want to create a common menu let's save it as "menu.php". menu.php Code: <html> <body> <a href="http://www.example.com/index.php">Home</a> - <a href="http://www.example.com/about.php">About...

PHP Operators - Examples | PHP Assignment - Arithmetic Operators list | PHP Comparison Operators - String Operators - Array Operators - Pre/Post-Increment and Pre/Post-Decrement.

n all programming languages, operators are used to manipulate or perform operations on variables and values. You have already seen the string concatenation operator "." in the Echo Lesson and the assignment operator "=" in pretty much every PHP example so far. There are many operators used in PHP, so we have separated them into the following categories to make it easier to learn them all. Assignment Operators Arithmetic Operators Comparison Operators String Operators Combination Arithmetic & Assignment Operators Assignment Operators Assignment operators are used to set a variable equal to a value or set a variable to another variable's...

PHP String Variables | String Creation | PHP String Reference | PHP - String Creation Heredoc

Before you can use a string you have to create it! A string can be used directly in a function or it can be stored in a variable. Below we create the exact same string twice: first storing it into a variable and in the second case we send the string directly to echo. PHP Code: $my_string = "Tizag - Unlock your potential!"; echo "Tizag - Unlock your potential!"; echo $my_string; In the above example the first string will be stored into the variable $my_string, while the second string will be used in the echo and not be stored. Remember to save your strings into variables if you plan on using them more than once! Below is the output...

PHP - Echo | How to print in PHP | PHP echo new line | php Echo Syntax - Function - Code - Example.

As you saw in the previous lesson, the PHP command echo is a means of outputting text to the web browser. Throughout your PHP career you will be using the echo command more than any other. So let's give it a solid perusal! Outputting a String To output a string, like we have done in previous lessons, use PHP echo. You can place either a string variable or you can use quotes, like we do below, to create a string that the echo function will output. PHP Code: <?php $myString = "Hello!"; echo $myString; echo "<h5>I love using PHP!</h5>"; ?> Display: Hello! I love using PHP!   Tips and Notes Note: The...

PHP Variables | Creating (Declaring) PHP Variables | Variable Example | Variable Scope | Variable Naming Conventions |

If you have never had any programming, Algebra, or scripting experience, then the concept of variables might be a new concept to you. A detailed explanation of variables is beyond the scope of this tutorial, but we've included a refresher crash course to guide you. A variable is a means of storing a value, such as text string "Hello World!" or the integer value 4. A variable can then be reused throughout your code, instead of having to type out the actual value over and over again. In PHP you define a variable with the following form: $variable_name = Value; If you forget that dollar sign at the beginning, it will not work. This is...

PHP Installation | How to Install and Configure PHP 5 | PHP: Manual Installation Steps

 PHP Installation : Many web developers want to run Apache and PHP on their own computer since it allows them to easily test their scripts and programs before they put them "live" on the Internet. This article gives a step by step guide on how you can install and configure PHP5 to work together with the Apache HTTP Server on Windows. The procedure has been tested to work on both Windows XP and Vista. If you have not already installed Apache on your machine, check out one of the guides listed below. This "How To" guide assumes that you have already completed installing Apache. If you are using Apache 1.3.x, see the guide How...

php introduction | php tutorial | php introduction tutorial

PHP Tutorial - Learn PHP :         If you want to learn the basics of PHP, then you've come to the right place. The goal of this tutorial is to teach you the basics of PHP so that you can: Customize PHP scripts that you download, so that they better fit your needs. Begin to understand the working model of PHP, so you may begin to design your own PHP projects. Give you a solid base in PHP, so as to make you more valuable in the eyes of future employers. PHP stands for PHP Hypertext Preprocessor. What You Should Already Know: Before you continue you should have a basic understanding of the following: HTML/XHTML JavaScript What...

Pages 71234 »
Twitter Delicious Facebook Digg Stumbleupon Favorites More