Карта сайта Интеллектуальная поисковая системаДобавить свою ссылку по ключевому запросуПоисковая система v3.kz поможет ускорить индексацию вашего сайта выводит в Топ |
|
<?php sprintf(%02.2f, 1); ?> Yields 1.00. This threw me a little off. To get the desired result, one needs to add the precision (2) and the length of the decimal seperator "." Well, your string specifies 12 placeholders and you only provide 9 values. The sprintf function requires that you pass as many values as the number of placeholders you specify in the format string. I actually think the error message is strikingly clear and is about as good an error message as you will ever see. For every format character in the format string, you must have a matching value specified. Whats in your $args variable at the point you receive the error? PHP sprintf() Function. PHP String Reference. Example. Replace the percent (%) sign by a variable passed as an argument And the error handling is really crappy (just an echo). I just threw this together so do with it what you will. =] <?php. Значения $num, $part_art, $id скриптом получаются и выводятся, - проверял. Подскажите в чём ошибка. Добрый день! Очень нужна помощь! При подтверждении заказа вылазит такая ошибка: Warning: sprintf() [function.sprintf]: Too few Error: sprintf() [function.sprintf]: Too few arguments. Contribute to php-src development by creating an account on GitHub. в общем выполнить sprintf не в шаблоне а в php. что-то вроде: $smarty->sprintf("{#error_message#}","некий текст"); Задача: » выполнить sprintf с сообщением {#error_message#}(Найдено %s ошибок). Информация взята v3.kz |
загрузка...
|