Answers for "which is the right way of declaring a variable in php? *"

PHP
1

how to make a variable in php

$varName = "Hello, World";
Posted by: Guest on December-18-2019
0

variables in php

<?php
  # To declare variables in php, you should prefix the variable name with
  # a dollar sign and assign it the value. For example:
  $msg = 'Hello World';
  $number = 10;
  $decimal = 98.6;
  $result = true;

  # To print out variable names, you can directly enter the variable name
  # inside of a print or echo statement. For example:
  echo "Variables: $msg, $number, $decimal, $result"
?>
Posted by: Guest on September-28-2021

Code answers related to "which is the right way of declaring a variable in php? *"

Browse Popular Code Answers by Language