Заменить данные
15.09.2014 php, php скрипты, Парсинг строки
16.05.2014 php скрипты в строке подстроку, строки
if (!function_exists("yandex_text2xml")) { function yandex_text2xml($text, $bHSC = false, $bDblQuote = false) { global $APPLICATION; $bHSC = (true == $bHSC ? true : false); $bDblQuote = (true == $bDblQuote ? true: false); if ($bHSC) { $text = htmlspecialcharsbx($text); if ($bDblQuote) $text = str_replace('"', '"', $text); } $text = preg_replace("/[\x1-\x8\xB-\xC\xE-\x1F]/", "", $text); $text = str_replace("'", "'", $text); $text = $APPLICATION->ConvertCharset($text, LANG_CHARSET, 'windows-1251'); return $text; } }
09.04.2014 Bitrix, php, php скрипты Регулярка, строки
09.12.2013 php, php скрипты в строке подстроку, строки
08.11.2013 javascript javascript, строки
11.06.2013 javascript javascript, в строке подстроку, строки
04.04.2013 Bitrix, php скрипты bitrix, отложенные функции, строки
16.03.2013 php, php скрипты PHP, События, строки
header.php
$GLOBALS['TITLE'] = ''; //тут будет храниться заголовок страницы //тут мы пишем наш код всех нужных нам компонентов function settitle ($title) { // global $GLOBALS['TITLE']; $GLOBALS['TITLE'] = $title; } function showtitle () { echo "{TITLE}"; //выводим временный костыль для автозамены буферизированного контента } ob_start(); echo "<html><head><title>"; showtitle (); //выводим заголовок страницы echo "</title></head><body>";
index.php
<?include('header.php')?> <?php settitle("Пример gfbfdg fdgdfgfdgотложенных функций"); //обратите снивание заголовок наш уже вывелся выше //но он был временно буферизирован и не попал на страничку ?> <?include('footer.php')?>
footer.php
06.02.2013 javascript No comments javascript, jquery, Ввод в input, строки
// Решени для javascript function setValidator(id, regex) { var element = document.getElementById(id); if (element) { var lastValue = element.value; if (!regex.test(lastValue)) lastValue = ''; setInterval(function() { var value = element.value; if (value != lastValue) { if (regex.test(value)) lastValue = value; else element.value = lastValue; } }, 10); } } // Решение для jQuery $(document).ready(function(){ $('.inputField').keyup(function(){ var login = $(this).val(); var shablon = /[А-Яа-я]{1,50}/; var resultCheck = login.match(shablon); if (resultCheck==login && resultCheck!=null){ //$('#info').text(""); } else{ var kolich= login.length; //$('#info').text("Разрешены буквы"); login = login.slice(0,kolich-1); $(this).val(login); } }); });/*end ready*/ <input type="text" id="test" class='inputField'/> <input type="text" id="test2" class='inputField'/> <input type="text" id="test3" class='inputField'/> <input type="text" id="test4" class='inputField'/> <script type="text/javascript"> setValidator('test', /^[а-яА-я-]*$/); </script>
$number = 123465789.45; $numbre_format_francais = number_format($number, 2, '.', ' '); // 123 465 789.45 echo CurrencyFormat(11800.95, "USD"); CCurrencyLang::CurrencyFormat(5000, 'RUB'); // 5 000 CCurrencyLang::CurrencyFormat(5000, 'RUB', true); // 5 000 руб.
лови ссылочку, бро, тут больше инфы
http://dev.1c-bitrix.ru/api_help/currency/functions/currencyformat.php