ymaps.ready(function(){
var geolocation = ymaps.geolocation;
$('#city').text('Город: '+geolocation.city);
$.ajax({
type: "GET",
url: "city.php?city='" + YMaps.location.city,
data:{
city: YMaps.location.city,
},
});
});});
public function myBestMethod(){
return parent::myBestMethod();
}
$numbers = array_key_exists('numbers', $_POST) ? $_POST['numbers'] : [];
foreach ($numbers as $ind => $number){
if (false === ctype_digit($number)){
unset($numbers[$ind]);
}
}
if ($numbers){
$numberString = implode(null, array_unique($numbers));
$sql = "SELECT * FROM `table` WHERE `dat` REGEXP '[{$numberString}]'"; // здесь лучше PDO
}
else {
throw new Exception('Array of numbers is empty');
}
if (!empty($picture['tmp_name'])){
$path = __DIR__.DIRECTORY_SEPARATOR.'upload';
$filename = 'my_picture.jpg';
mkdir($path, 0755, true);
if (move_uploaded_file($picture['tmp_name'], $src = $path.DIRECTORY_SEPARATOR.$filename){
$arProp["PIC"] = $src;
}
}