Hello,
When I call the Ebays XML API I get an array or something similar back (see the code sample), is it possible to "select item_id where item_id = 123123" or something similar as in MySQL? If, How can I do that? Also, I need to attach a PHP variables to the row I selected as for example $starttime, $endtime and so on.
Here is the code sample (the end of the scritpt);
<?php
//stores the alternationg background colour of the rows
$bgColor = "#FFFFFF";
//go through each result
foreach($itemNodes as $item)
{
//get the required nodes from the results
$itemID = $item->get_elements_by_tagname('ItemID');
$title = $item->get_elements_by_tagname('Title');
$price = $item->get_elements_by_tagname('CurrentPrice');
$startTime = $item->get_elements_by_tagname('StartTime');
$endTime = $item->get_elements_by_tagname('EndTime');
$link = $item->get_elements_by_tagname('ViewItemURL');
//display the result in a table row
?>
<TR bgcolor="<?php echo $bgColor ?>">
<TD><?php echo $itemID[0]->get_content(); ?></TD>
<!-- Display the Title as a link to the item on eBay -->
<TD><A href="<?php echo $link[0]->get_content(); ?>" target="_blank">
<?php echo $title[2]->get_content(); ?>
</A>
</TD>
<TD><?php echo $price[0]->get_content(); ?></TD>
<TD><?php echo $startTime[0]->get_content(); ?> GMT</TD>
<TD><?php echo $endTime[0]->get_content(); ?> GMT</TD>
</TR>
<?php
//alternate the background colours
$bgColor = $bgColor == "#FFFFFF" ? "#EEEEEE" : "#FFFFFF";
} ?>
</TABLE>
<?php
}
Best Regards
Oskar R