3v4l.org

run code in 300+ PHP versions simultaneously
<?php $userdb = array( array( 'uid' => '100', 'name' => 'Sandra Shush', 'pic_square' => 'urlof100' ), array( 'uid' => '5465', 'name' => 'Stefanie Mcmohn', 'pic_square' => 'urlof100' ), array( 'uid' => '40489', 'name' => 'Michael', 'pic_square' => 'urlof40489' ) ); // uid will be key and name will be its value $temp = array_column($userdb, 'name','uid'); echo $temp[100];

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
153.51 ms | 2112 KiB | 9 Q