ID: 29760 Updated by: [EMAIL PROTECTED] Reported By: sych at php dot com dot ua -Status: Feedback +Status: Bogus Bug Type: Strings related Operating System: win2000 PHP Version: 5.0.0 New Comment:
Ah, there was already a script. The wordwrap function seperates on characters (second parameter), not words. Please read the documentation at http://php.net/wordwrap Previous Comments: ------------------------------------------------------------------------ [2004-08-19 16:35:16] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try avoid embedding huge scripts into the report. ------------------------------------------------------------------------ [2004-08-19 16:30:55] sych at php dot com dot ua Code1: $text = wordwrap($string, 2, "#"); Result1: word1#word2#word3#word4#word5#word6#word7#word8" Expected result1: word1 word2# word3 word4# word5 word6# word7 word8 Code2: $text = wordwrap($string, 3, "#"); Result2: word1#word2#word3#word4#word5#word6#word7#word8" Expected result2: word1 word2 word3# word4 word5 word6# word7 word8 ------------------------------------------------------------------------ [2004-08-19 16:22:56] [EMAIL PROTECTED] Err.. Forget it, clicked on a wrong link. Please, provide more information, your example is not readable. ------------------------------------------------------------------------ [2004-08-19 16:21:00] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip ------------------------------------------------------------------------ [2004-08-19 16:19:30] sych at php dot com dot ua Description: ------------ not correct works function, separators are placed accidentally, Reproduce code: --------------- $text = wordwrap($row['text'], $param['words'], "#"); Expected result: ---------------- Определение страны#пришедшего (PHP,#PostgreSQL) [p]Зачем#нам это#нужно[/p] В этой#статье будет#рассматриваться#способ определить#страну пришедшего#на Ваш сайт#пользователя.#Применять это Actual result: -------------- Определение страны пришедшего (PHP, PostgreSQL) [p]Зачем нам это нужно[/p] В этой статье будет рассматриваться способ определить страну пришедшего на Ваш сайтпользователя. Применять это # ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29760&edit=1
