$polygonBox = [
[55.761515, 37.600375],
[55.759428, 37.651156],
[55.737112, 37.649566],
[55.737649, 37.597301],
];
$sbPolygonEngine = new sbPolygonEngine($polygonBox);
$isCrosses = $sbPolygonEngine->isCrossesWith(55.746768, 37.625605);
// $isCrosses is boolean
SELECT
p.*,
(SELECT COUNT(op.count) FROM orders_products op WHERE op.product_id = p.id) AS countorders
FROM products p
ORDER BY p.id ASC
LIMIT 25
const container = document.querySelector('#element');
const itemSelector = '.someclass';
function onClick(e) {
e.preventDefault();
console.log(e.target.closest('li').dataset.id);
}
container.querySelectorAll(itemSelector).forEach(n => {
n.addEventListener('click', onClick);
});
container.addEventListener('click', e => {
const item = e.target.closest(itemSelector);
if (item) {
onClick(e);
}
});
(<script(\stype="text\/javascript")?>)(.*?)(<\/script>)
\1\$\(document\).on\('ready', function\(\) \{\3\}\);\4
$id = null;
reset($array); // надежнее обнаружить нужный ключ перебором и последующей проверкой
$key = key($array);
$match = null;
if ( preg_match('/^id:(\d+)/', $key, $match) ) $id = (int) $match[1];