Variables, Type casting ,Concatination and Constants in PhP

1. Variables:

$ sign is used for defining the variables in PHP. eg$var_1 =12. Here the datatype is automatically assigned. You don’t have to specify the datatype of a declared variable.

echo is used to output the results.

2. Changing a variable’s data type:

3. Concatenation :

4. Constants:

In PhP you can define constants. The value of the constant remains unchanged throughout the execution of the program. You can define a constant using the define () function as shown below. It is common to use capital letters for defining the constants. Also avoid using the php reserved keywords such as boolean, echo etc,,,

Related

Controllers and views are the integral part of ruby on rails frameworks. The requests from the client is first sent to…

Read more

This tutorial will teach you how to connect MySQL database and JSP on eclipse. I really had a hard time connecting JSP…

Read more

Database connection: Connecting mongoDB with php is really simple if your configured php with mongoDB using php…

Read more

Internet is huge! Help us find great content

About

The Best Tutorials & Tips to Speedup Your DevOps Workflow.

Created by Bibin Wilson.