Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php constant array

<?php
    const ANIMALS = array('dog', 'cat', 'ant');
    define('ANIMALS', array('dog', 'cat', 'ant'));
?>
Comment

array constant in php

<?php
define("vehicles", [
  "car",
  "bike",
  "jcb"
]);
echo vehicles[0];		//car
?>
Comment

PREVIOUS NEXT
Code Example
Php :: get blog page url in wordpress 
Php :: laravel sum relationship column 
Php :: print try catche errors 
Php :: file put contents append 
Php :: reset password multipple database laravel 
Php :: php get parameter 
Php :: laravel drop table column 
Php :: how to get a whole number from decimal in php 
Php :: how to add values to an array in laravel 
Php :: laravel get items by ids 
Php :: image storage storepublicy in laravel 
Php :: laravel force delete 
Php :: Exception #0 (MagentoFrameworkExceptionValidatorException): Invalid template file: 
Php :: utf8 php 
Php :: php datetime sub minutes 
Php :: php exception import 
Php :: why do we use php exceptions 
Php :: get process id php 
Php :: create project laravel 
Php :: import facade URL laravel 
Php :: laravel curl package 
Php :: php override trait method and call it 
Php :: convert date to timestamp in laravel builder 
Php :: array collapse laravel 
Php :: laravel print to log 
Php :: laravel observer check if field changed 
Php :: symfony see all make command 
Php :: in array php multiple values 
Php :: how to set base url in codeigniter 
Php :: get woocommerce product category link by id 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =