output PHP to Flash variables

Sometimes when you load data into Flash from a PHP script and your data contains characters in other languages you need to encode it properly or Flash will show strange characters.

User this PHP code to encode strings correctly:

function echoFlash($var, $value) {
// output a var in a way Adobe Flash can read it

echo "$var=" . urlencode(utf8_encode($value)) . "&";
}
Leave a comment
Name
Email (optional)
Your email will only be used to show your Gravatar and to send you replies to this article (if you opt to receive them). You won't get ANY other messages at all!
Comment
No HTML allowed
Notify me via email
 
 
Share

Valid HTML 4.01 Strict