Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php array destructuring

<?php

$person = ['John','Doe'];
[$first_name, $last_name] = $person;

var_dump($first_name, $last_name);
Code language: PHP (php)
Source by www.phptutorial.net #
 
PREVIOUS NEXT
Tagged: #php #array #destructuring
ADD COMMENT
Topic
Name
9+8 =