Jump to content

Search the Community

Showing results for tags 'xml php'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 1 result

  1. Hi all, hope you can help I have an xml document that is loading nicely into a database, with the exception of the images within the image tags. See structure of xml below <channel> <property> <name>Name here</name> <description>​Description here etc etc</description> <images> <img id="0">img url 1 here </img> <img id="1">img url 2 here </img> </images> </property> </channel> I would like to get the image url's into the database with the | to separate them if possible. Below is the php script I am using get the info from xml into database. It works well for all fields except the images as they are id's with the main image tag <?php include('conn.php'); if(!$xml=simplexml_load_file('test1.xml')){ trigger_error('Error reading XML file',E_USER_ERROR); } foreach ($xml as $syn) { $name = $syn->name; $description = $syn->description; $images = $syn->img[]; $sql = "INSERT INTO Benek ( name, description, images ) VALUES ( '$name', '$description', '$images' )"; $query = mysql_query($sql); if (!$query) { echo ('Error: ' . mysql_error()); } else { echo "Record added"; } } ?> Thanks for your time. Paul
×
×
  • Create New...