by dayo ade | Oct 18, 2017 | Articles and Short Tutorials, Web Design Tutorials and Articles
The switch statement is used to perform different actions based on different conditions. The PHP switch Statement Use the switch statement to select one of many blocks of code to be executed. Syntax switch (n) { case label1: code to be executed if n=label1;...
by dayo ade | Oct 18, 2017 | Articles and Short Tutorials, Web Design Tutorials and Articles
Conditional statements are used to perform different actions based on different conditions. PHP Conditional Statements Very often when you write code, you want to perform different actions for different conditions. You can use conditional statements in your code to do...
by dayo ade | Oct 18, 2017 | Articles and Short Tutorials, Web Design Tutorials and Articles
Constants are like variables except that once they are defined they cannot be changed or undefined. PHP Constants A constant is an identifier (name) for a simple value. The value cannot be changed during the script. A valid constant name starts with a letter or...
by dayo ade | Oct 18, 2017 | Articles and Short Tutorials, Web Design Tutorials and Articles
A string is a sequence of characters, like “Hello world!”. PHP String Functions In this chapter we will look at some commonly used functions to manipulate strings. Get The Length of a String The PHP strlen() function returns the length of a string. The...
by dayo ade | Oct 18, 2017 | Articles and Short Tutorials, Web Design Tutorials and Articles
A string is a sequence of characters, like “Hello world!”. PHP String Functions In this chapter we will look at some commonly used functions to manipulate strings. Get The Length of a String The PHP strlen() function returns the length of a string. The...
by dayo ade | Oct 18, 2017 | Articles and Short Tutorials, Web Design Tutorials and Articles
PHP Data Types Variables can store data of different types, and different data types can do different things. PHP supports the following data types: String Integer Float (floating point numbers – also called double) Boolean Array Object NULL Resource PHP String...
by dayo ade | Oct 18, 2017 | Articles and Short Tutorials, Web Design Tutorials and Articles
In PHP there are two basic ways to get output: echo and print. In this tutorial we use echo (and print) in almost every example. So, this chapter contains a little more info about those two output statements. PHP echo and print Statements echo and print are...
by dayo ade | Oct 18, 2017 | Articles and Short Tutorials, Web Design Tutorials and Articles
Variables are “containers” for storing information. Creating (Declaring) PHP Variables In PHP, a variable starts with the $ sign, followed by the name of the variable: Example <?php $txt = “Hello world!”; $x = 5; $y = 10.5; ?> After the...
by dayo ade | Oct 18, 2017 | Articles and Short Tutorials, Web Design Tutorials and Articles
A PHP script is executed on the server, and the plain HTML result is sent back to the browser. Basic PHP Syntax A PHP script can be placed anywhere in the document. A PHP script starts with <?php and ends with ?>: <?php // PHP code goes here ?> The default...
by dayo ade | Oct 18, 2017 | Articles and Short Tutorials, Web Design Tutorials and Articles
The display property is the most important CSS property for controlling layout. The display Property The display property specifies if/how an element is displayed. Every HTML element has a default display value depending on what type of element it is. The default...