Answers for "php define()"

PHP
1

define in php

//define() is used to create constants
define(name,value);
//here name has to be a string
//here value can be string, integer, float, boolean or NULL, 
//and can be an array to if you are using PHP 7.0+

//define() before php 7.3
define(name,value,case_insensitive);
//case_insensitive is optional and can be TRUE or FALSE by default its false
Posted by: Guest on April-04-2021
0

php define()

<?php

 define("cars", [
  "Alfa Romeo",
  
  "BMW",
  "Toyota"
]);
echo cars[0];
?>
Posted by: Guest on September-14-2021
-1

define php

define("name", {value});
Posted by: Guest on November-24-2020

Browse Popular Code Answers by Language