How do I put a percentage sign in a text string loading from database?

I have everything working! I can change my database text, and call it from my flash through php. But it doesn’t seem to translate over the ‘%’ sign.

I know this is probably not database specfic.

“Text=Test text&Comment=Take 10% off all products”

The variable Comment only comes out as:

Take 10 of all products.

Do I use an escape character?

Thanks for any help

Ron

try %… not sure if it’ll work though…

&Comment=Take 10%25 off all products

Thanks, worked perfectly. Where is the documentation for this?

What part is making it work the ‘25’, or is ‘%25’ an escape character for ‘%’?

Thanks

Just a guess here, I see no “” anywhere, so Im guessing it only uses key characters when parsing strings within a “”

again, just an assumption from other programming languages.

Everything should be in the AS Dictionary :slight_smile:

And the whole thing makes it work. I believe it’s % and then the ASCII code.

*Originally posted by 3dron *
What part is making it work the ‘25’, or is ‘%25’ an escape character for ‘%’?

‘%25’ = %

*Originally posted by 3dron *
Where is the documentation for this?

Simply, do the following:

string = “%”
trace(escape(string));

Just to split hair a bit more, don’t call your variable string, it’s confusing, and it might be a reserved word :slight_smile: