SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2003
    Location
    Denver
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP Bad Variables with XML File

    I have a xml file with periods (body.content) and dashes (issuer-symbol). Normally I parse it and put into array, then when I parse it I was going to enter certain details into a database.

    But I don't know how to work around the periods and dashes without errors. Any help would be great. Thanks so much.

  2. #2
    ********* wombat firepages's Avatar
    Join Date
    Jul 2000
    Location
    Perth Australia
    Posts
    1,717
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you could ...
    $xml = str_replace(array( '.' , '-' ) , '_' , $xml);
    any pesky characters b4 parsing , ....above to an underscore but you may want to make up some replacements that you can recognise to reverse the process later ?

  3. #3
    SitePoint Enthusiast
    Join Date
    Jul 2003
    Location
    Denver
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the suggestion.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •