خرید بک لینک

Vote count: 0

I have a source array that looks like this:

$data = array(
    'foo' => array(
        'bar' => 'foo_bar',
        'baz' => 'foo_baz'
    ),
    'fizz' => array(
        'bar' => 'fizz_bar',
        'baz' => 'fizz_baz'
    )
);

I would like to create another array by selecting a key: bar or baz, which will retu all of the root keys with the values of the specified key?

$result = array(
    'foo' => 'foo_bar',
    'fizz' => 'fizz_bar'
);

Is there a built-in php function(s) to generate the following results without doing my own loops?

asked 2 mins ago

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 16 خرداد 1395 ساعت: 10:00

صفحه بندی