Assume you have an existing associative array, $people, that already contains username and email values. What is
Fantastic news! We've Found the answer you've been seeking!
Question:
Assume you have an existing associative array, $people, that already contains username and email values. What is the PHP statement to add a 'position' element to the array that has a value of 'student' while keeping the username and email elements unchanged ?
$people['position'] = 'student'; |
$people=>position = 'student'; |
$user->array->push('role', 'student'); |
$user['role'] = 'student'; |
$people = ('position' => 'student'); |
$people->array->push('position', 'student'); |
$people->position = 'student'; |
Related Book For
Introduction to Algorithms
ISBN: 978-0262033848
3rd edition
Authors: Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest
Posted Date: