Friday, November 13
Trending
- Microsoft 365 Outage: Outlook, Teams and Copilot Down. What We Know
- Diwali Online Shopping Scams 2026: 10 Ways to Stay Safe
- 10 Best DDoS Protection Services for 2027
- 12 Best Web Application Firewalls (WAF) for 2027
- Best Ethical Hacking Tools in 2027: Free & Paid Picks
- Software supply chain attacks 2026: Timeline and developer checklist
- Binance Hack: $6.3 Billion Drained in the Largest Crypto Theft Ever. What We Know So Far
- This Site Uses XSLT Chrome Warning Explained: How to Fix It
A Variable is a holder used to store both numeric and non-numeric data.
Rules for Variable declaration
- In PHP, the variable starts with a dollar($) sign, succeeded by the name of the variable.
- In PHP, a variable name must start with a letter or the underscore character.
- In PHP, a variable name only contains alpha-numeric characters and underscores (A-Z,a-z, 0-9, and _).
- A variable name must not contain space.
Assigning Values to Variables
<?php
$name = "infovistar";
echo $name;
?>
Example (Addition of two numbers):
<?php
$a = 10;
$b = 15;
$c = $a + $b;
echo $c;
?>



