Answers for "In PHP7, you can create an Array constant using the ____ function."

PHP
1

array constant in php

<?php
define("vehicles", [
  "car",
  "bike",
  "jcb"
]);
echo vehicles[0];		//car
?>
Posted by: Guest on September-03-2021
1

php constant array

<?php
    const ANIMALS = array('dog', 'cat', 'ant');
    define('ANIMALS', array('dog', 'cat', 'ant'));
?>
Posted by: Guest on March-18-2021

Code answers related to "In PHP7, you can create an Array constant using the ____ function."

Browse Popular Code Answers by Language