Answers for "how to assign an array into a constant php"

PHP
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 "how to assign an array into a constant php"

Browse Popular Code Answers by Language