Jump to content

Special Character Problem?


euel

Recommended Posts

Hi people!

I have a form with a select list where options are populated from a table in my db..

the string format is like this -> car - branch (ex. toyota - japan so on..)

when viewing the options it displays correctly with the "-" but when i tried submitting the form which will be inserted into the db

the "- branch" gets cut off..

i think i need to encode it but i don't know how to do it..

 

thanks for any reply!  :D

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/254252-special-character-problem/
Share on other sites

thanks PFMaBiSmAd! i was using a {$value} for the option i didnt realize im missing some single quotes.. -_-

can i just ask another question? its related to this..

i have 3 options (ex. toyota - japan, toyota - usa, toyota - europe) and saved each on variable (branch1, branch2, branch3)

i tried making it an array with -> explode("," $array) and print them out but the output is like this -> array ([0] => toyota - japan, toyota - usa, toyota - europe) ..

which is not the output i want.. is there any other way in doing this?

 

appreciate the reply! thanks again!

(im gonna read the php manual for the mean time)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.