note 47796 added to function.highlight-string
| From: | php-general at lists dot php dot net | Date: | Tue, 30 Nov 2004 17:16:21 +0000 |
| Subject: | note 47796 added to function.highlight-string | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-81189@lists.php.net to get a copy of this message | ||
When I user the function highlight_string(), I always got this Error Warning:
Warning: Unexpected character in input: '' (ASCII=92) state=1 in
/srv/www/htdocs/web123/html/configs/functions.php on line 431
So now you must noch that the ASCOO character 92 is the \
That means you have to put the text trough the function stripslashes():
<?php
echo highlight_string(stripslashes($value));
?>
Apart from that a second note, wicht is just for the german translation:
Die Funktion highlight_string() besitzt einen zweiten, optionalen Parameter, welche den Return Modus
aktiviert.
Wenn man also an zweiter Stelle ein true mit übergibt, so gibt die Funktion den Text nicht aus,
sondern liefert ihn als Return Wert zurück.
Achtung: Dieser Parameter wurde in PHP Version 4.2.0 eingeführt.
----
Manual Page -- http://www.php.net/manual/en/function.highlight-string.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+47796
Delete -- http://master.php.net/manage/user-notes.php?action=delete+47796&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47796&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47796&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47796&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47796&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47796&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+47796&report=yes
Search -- http://master.php.net/manage/user-notes.php