<?php function result(){ return ['foo', 'bar']; } $x = []; list($a, $b) = result(); $x[$a] = $b; var_dump($x);
You have javascript disabled. You will not be able to edit any code.