array_push($types, $q->where('type_id', $type->id)->count(), $type->title);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postdata));
$postdata = array(
'files' => new CURLFile($target),
'action' => 0,
'id_ad' => 0
);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
$url_parse_arr = parse_url('https://vk.com/test');
echo $url_parse_arr['path'] // test
$url_parse_arr = parse_url('https://vk.com/id100');
echo $url_parse_arr['path'] // id100
if (preg_match('/id\d+/ui', $url_parse_arr['path'])){
$url_parse_arr['path'] = str_replace('id', '', $url_parse_arr['path'] ); // 100
}
ALTER TABLE dates ADD UNIQUE keyword('date', 'id');
INSERT IGNORE INTO dates (...) VALUES
$arr = preg_split('/\n/u',$str);
$arr_format = preg_filter('/\s+/', ' ', $arr);
$arr_no_empty = preg_grep('/\w+/', $arr_format);
print_r(array_chunk($arr_no_empty, 7));
$arr = array(
'country' => $country,
'city' => $city,
'lat' => $lat,
'lng' => $lng,
);
file_put_contents('data_yandex_map.json', json_encode($arr));