note 56406 added to function.utf8-encode
| From: | aktionimskript at gmx dot net | Date: | Thu, 01 Sep 2005 15:52:33 +0000 |
| Subject: | note 56406 added to function.utf8-encode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-94612@lists.php.net to get a copy of this message | ||
if you want to put variables as parameter in a flashfile, i prefer using to convert the string with
utf8_encode() [or preg_replace, or iconv] and after this i encode it with urlencode();
<?php
$yourstring="yourstring";
$str_utf8=utf8_encode($yourstring);
$str_encoded=urlencode($str_utf8);
echo "<script language='javascript'>";
echo "parameterForFlash='".$str_encoded."';";
echo "</script>";
?>
now you can use the variable (parameterForFlash) in your javascript (plugindetection), that writes
the flash object/embed.
----
Manual Page -- http://www.php.net/manual/en/function.utf8-encode.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+56406
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56406&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56406&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56406&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56406&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56406&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56406&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+56406&report=yes
Search -- http://master.php.net/manage/user-notes.php