Question from the PHP7 test

Display the first element of an array in PHP

Medium

What will this code display?

<?php
$data=[
   [1, 'Tom'],
   [2, 'Fred'],
];

[$id1, $name1]= $data[0];

echo $id1. ':'. $name1;

Author: Julien BreuxStatus: PublishedQuestion passed 1114 times
Edit
3
Community EvaluationsNo one has reviewed this question yet, be the first!