$(document).ready(function () {
var modal;
if (window.location.hash && (modal = $(window.location.hash)) && modal.length) {
// тут код, который отобразит модальное окно
}
});
$str = '{tabs = некоторый код}тут текст
в несколько строк{/tabs}';
echo preg_match('/\{tabs[^\}]+\}([^\{]+)\{\/tabs\}/', $str, $matched) ?
print_r($matched, true) : 'false';
Array
(
[0] => {tabs = некоторый код}тут текст
в несколько строк{/tabs}
[1] => тут текст
в несколько строк
)
.clicked {
background-color: red;
}
$('.myclass').on('click', function () {
$(this).toggleClass('clicked');
});
INSERT INTO `billings` (user_id, billing_type, currency_id)
SELECT
b.user_id
,b.billing_type
,c.id as currency_id
FROM (
SELECT 11 as user_id, 1 as billing_type UNION
SELECT 11 as user_id, 2 as billing_type UNION
SELECT 11 as user_id, 3 as billing_type
) b
INNER JOIN `currency` c ON c.name='usd'
if (preg_match('/' . preg_quote($_SERVER['PHP_SELF'], '/') . '$/i', str_replace('\\', '/', __FILE__))) {
exit();
}