PHP SimpleXML Special Characters

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pras2309
    New Member
    • Mar 2007
    • 3

    PHP SimpleXML Special Characters

    Hi All,
    I am new to XML. Please help me.
    My Problem.
    I have an XML which I have created dynamically uing the simpleXML of PHP 5 and I want to store that XML in the MY SQL Database.
    The XML is having special characters which are generating the MySQL errors.

    I had tried with htmlspecialchar acters, htmlentities to encode the specialcharacte rs but it doesn't server my purpose.

    Please help me out.

    Prashant
  • michaelb
    Recognized Expert Contributor
    • Nov 2006
    • 534

    #2
    You should probably use mysql_real_esca pe_string function.

    Comment

    • pras2309
      New Member
      • Mar 2007
      • 3

      #3
      encoding works fine. aut it also converts the xml tags, so doesnt serves my purpuse.

      See the problem in detail.

      http://www.thescripts. com/forum/thread625260.ht ml

      (Please bear this time I m new to this forum. I will maintain the decorum inthe future posts).

      Thanks in advance

      Prashant

      Comment

      Working...