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
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)

Link to comment
Share on other sites

actually scootstah my ex. was a string i just failed to clarify it but thanks for the reply..

anyways ignore my last post cuz i already fixed it, i just made an error in placing a " " for a "," which is stupid  ::)

thnks! solved!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.