Hi DP, I am working from an example on trying to parse an RSS feed. I can sucessfully parse, but now I want to import into my database. I am very close but my imports are slightly off when importing row by row... here is my example... for ($i=0; $i<sizeof($vals); $i++) { //Check if the tag type is TITLE and that the value is not the title of your blog if ($vals[$i]['tag'] == "GUID" && $vals[$i]['value'] != $blogtitle) { echo "<b>Permalink URL:</b><br />"; echo "<a href=\"" . $vals[$i]['value'] . "\">" . $vals[$i]['value'] . "</a>"; echo "<br><br>"; $postiddata = $vals[$i]['value']; mysql_query("INSERT INTO rssfeeds (postid) VALUES('$postiddata') ") or die(mysql_error()); } if ($vals[$i]['tag'] == "TITLE" && $vals[$i]['value'] != $blogtitle) { echo "<b>Post Title:</b><br />"; echo $vals[$i]['value']; echo "<br><br><hr>"; //$postiddata = $vals[$i]['value']; //$postidval = $vals['tag']['GUID']; $posttitledata = $vals[$i]['value']; mysql_query("UPDATE rssfeeds SET posttitle='$posttitledata' WHERE postid='$postiddata'") or die(mysql_error()); } } when it imports it looks like this Post 1 ID ---- Post 2 URL ---- Post 2 Tags Post 2 ID ---- Post 3 URL ---- Post 3 Tags Post 3 ID ---- Post 4 URL ---- Post 4 Tags As you can see I am 1 off in my array... I am inserting the first set of url's then going from that url as a unique key. Any ideas on how to solve this? Thanks!!
An advice , don't calculate the number "$i<sizeof($vals)" into the loop because every time than the script returns in this point php does the calculation again and again do it like this: $num = sizeof($vals); for ($i=0; $i<$num; $i++)