In perl, I could assign a list to multiple values in a hash, like so:
# define the hash...
my %hash = (
foo => 1,
bar => 2,
baz => 3,
);
# change foo, bar, and baz to 4, 5, and 6 respectively
@hash{ 'foo', 'bar', 'baz' } = ( 4, 5, 6 );
Is there any way to do the same in php? In fact, is there even a way to get a slice of an assoc array at all?