Wednesday, 6 March 2024

How to Declare and Define a Variable in PHP


How to Declare and Define a Variable in PHP

In PHP Variable starts with the $ sign.
$ sign is always used with variable name whether the variable is going to be declared or defined.

Variable Declaration
$num;
$name;

Variable Definition
$num = 5;
$name = "usman";

Here variable $num contains the value "5" assigned to it.
Here variable $name contains the value "usman"

No comments:

Post a Comment

CEOs and Founder of IT Companies

  CEOs and Founders of IT Companies  Amazon CEO: Andy Jassy Founder: Jeff Bezos   Google CEO: Sundar Pichai Founders: Larry Page...