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 :: laravel create new request 
Php :: laravel target class does not exist 
Php :: how to take last entry in database in laravel Method Two 
Php :: laravel add auto increment 
Php :: check if phone number is valid php 
Php :: laravel htaccess 
Php :: carbon get day name from date 
Php :: how to fix PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted 
Php :: create if not exist laravel 
Php :: Command for single migration in larvel 
Php :: laravel passport get tokenId 
Php :: carbon subdays 
Php :: laravel auth 6 
Php :: laravel carbon set timezone 
Php :: add text to image and save php 
Php :: encrypt/decrypt data php 
Php :: implode array keys in php 
Php :: phpoffice spreadsheet background color 
Php :: string array to array in php 
Php :: php static dropdown list example 
Php :: tableau aléatoire php 
Php :: get type of object in php 
Php :: do i need to install php after xampp 
Php :: laravel return view in web.php 
Php :: laravel query builder get last insert id 
Php :: how to get shop page url in wordpress 
Php :: how to display the site tagline in wordpress 
Php :: wordpress get user data from email 
Php :: remove gutenberg cpt 
Php :: random element in faker 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =