Thank you very much CTphpnwb.
How newbie am I, I only forgot to put an (.) after the declaration of new variable earlier.
$content .= ...
The single period saves me... Thanks a Lot.
18 Replies - 2192 Views - Last Post: 16 February 2012 - 11:30 AM
#17
Re: Parsing XML
Posted 15 February 2012 - 03:26 PM
Sorry, guess I misunderstood what the problem was.
#18
Re: Parsing XML
Posted 16 February 2012 - 11:01 AM
Thats ok Mr. JackOfAllTrades, you have help me so much... Thank you very much.. Just continue helping and more powers.
#19
Re: Parsing XML
Posted 16 February 2012 - 11:30 AM
Hi, sorry for this. I have a follow-up problem. this also related on my original question.
I have successfully running the function and now I'm facing another problem,
what if I have a couple of keywords that must be use to query into the xml link.
example of 5 keywords;(keyword1,keyword2,keyword3,keyword4,keyword5)
The problem on it is that the keyword1 rss results is also displayed in all of the other. Can anyone help me to solve this? Thanks in advance.
I have successfully running the function and now I'm facing another problem,
what if I have a couple of keywords that must be use to query into the xml link.
example of 5 keywords;(keyword1,keyword2,keyword3,keyword4,keyword5)
$key = explode(",",$keywords);
foreach($key as $new_keywords){
$db_content=$new_keywords;
$doc_db = new DOMDocument();
$doc_db->load('http://sample_website.com/api/quertstring='.$db_content.'');
$arrFeeds_db = array();
foreach ($doc_db->getElementsByTagName('Result') as $node_db) {
$itemRSS_db = array (
'title' => $node_db->getElementsByTagName('Label')->item(0)->nodeValue,
'desc' => $node_db->getElementsByTagName('Description')->item(0)->nodeValue,
'link' => $node_db->getElementsByTagName('URI')->item(0)->nodeValue,
'date' => $node_db->getElementsByTagName('pubDate')->item(0)->nodeValue
);
array_push($arrFeeds_db, $itemRSS_db);
$new_db_content .='<a href='.$itemRSS_db['link'].'>'.$itemRSS_db['title'].'</a><br/>'.$itemRSS_db['desc'].'';
}
//RESULTS
echo $new_db_content;
}
The problem on it is that the keyword1 rss results is also displayed in all of the other. Can anyone help me to solve this? Thanks in advance.

New Topic/Question
Reply



MultiQuote

|