$arr = array(
1 => array(
"name" => "n1",
"desc" => "desc1"
),
2 => array(
"name" => "n2",
"desc" => "desc2"
),
3 => array(
"name" => "n3",
"desc" => "desc3"
)
);
$result = array(
'name' => array_column($arr, 'name'),
'desc' => array_column($arr, 'desc')
);
var_dump($result);
array (size=2)
'name' =>
array (size=3)
0 => string 'n1' (length=2)
1 => string 'n2' (length=2)
2 => string 'n3' (length=2)
'desc' =>
array (size=3)
0 => string 'desc1' (length=5)
1 => string 'desc2' (length=5)
2 => string 'desc3' (length=5)
var somefunc = function(event) {
// Функция
}
$('.ShowDataContent .DataPhoto').bind('dblclick', somefunc);
$('.ShowDataContent .ActionsButton .b').bind('click', somefunc);
<?php
$url = 'http://api.vk.com/blank.html#access_token=7ada2a9807c5e450ac7b0a144f6730dc49fc5d584054b1953c9ec9485a65a4ec74ee2264b70a4293b5a66&expires_in=0&user_id=66666666';
function url_info($url)
{
parse_str(parse_url($url, PHP_URL_FRAGMENT), $query);
return $query;
}
var_dump(url_info($url));
array(3) {
["access_token"]=>
string(85) "7ada2a9807c5e450ac7b0a144f6730dc49fc5d584054b1953c9ec9485a65a4ec74ee2264b70a4293b5a66"
["expires_in"]=>
string(1) "0"
["user_id"]=>
string(8) "66666666"
}