Escape Special characters in Select

QuestionsEscape Special characters in Select
Senai asked 11 years ago

Hi, I am using a select edit type for one column. The values have special characters like i-acute, u-acute…..(latin letters) in it. So how do I escape this characters for the drop down list to work properly. Currently it is not displaying any list item. I have written it like this:

$col["edittype"] = "select";
$col["editoptions"] = array("value"="1:SABE;2:TIAN LTD.;3:GTHAIE LTD.;4:RIO ;5:MBER LTD;6:ZHP CO. TD.;7:DROP;8:NGO CHEW;9:LIB FACTORY;10:COMMERCEBV;11:OOD CO. LTD;12:INDUSTRIA DE ;13:CARAMOS S/A;14:WEIF;15:Lind;16:LIY,;17:Shandong, Ltd;18:CMAX Int'l rp;19:Tia Co., Ltd ;20:TI CO.,LTD;21:G. MAR & C. S.P.A.");

But the list is displaying empty.
thanks for your urgent reply.

1 Answers
Abu Ghufran answered 11 years ago

Hi,

Try using utf8_decode() for non-english characters.
e.g.
$col["editoptions"] = array("value"=> utf8_decode("……..") );

Your Answer

6 + 5 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?