Note that there are some explanatory texts on larger screens.

plurals
  1. POWant to filter XML/RSS by Week day with PHP
    primarykey
    data
    text
    <p>First I'd like to say that I'm very new with PHP. I have an xml file: <a href="http://www.anewmandesigns.com/RSSseptember2013.xml" rel="nofollow">http://www.anewmandesigns.com/RSSseptember2013.xml</a></p> <p>In the feed, I'm trying to just display Wednesday's dates (the actual entries) in the month of September (4th, 11th, 18th, and the 25th) on my website using PHP. Here's my code... how can I modify?</p> <pre><code>&lt;?php $rss = new DOMDocument(); $rss-&gt;load('http://www.anewmandesigns.com/oakshade/calendar/rss/RSSseptember2013.xml'); $feed = array(); foreach ($rss-&gt;getElementsByTagName('item') as $node) { $item = array ( 'title' =&gt; $node-&gt;getElementsByTagName('title')-&gt;item(0)-&gt;nodeValue, 'desc' =&gt; $node-&gt;getElementsByTagName('description')-&gt;item(0)-&gt;nodeValue, 'link' =&gt; $node-&gt;getElementsByTagName('link')-&gt;item(0)-&gt;nodeValue, 'date' =&gt; $node-&gt;getElementsByTagName('pubDate')-&gt;item(0)-&gt;nodeValue, ); array_push($feed, $item); } $limit = 5; for($x=0;$x&lt;$limit;$x++) { $title = str_replace(' &amp; ', ' &amp;amp; ', $feed[$x]['title']); $link = $feed[$x]['link']; $description = $feed[$x]['desc']; $date = date('l F d, Y', strtotime($feed[$x]['date'])); $year = substr($timestamp, 0, 4); $month = date(' M ', strtotime($feed[$x]['date'])); $day = date(' d ', strtotime($feed[$x]['date'])); echo '&lt;p&gt;'.$month.'&lt;span&gt; '.$day.'&lt;/span&gt;&lt;/p&gt;'; echo '&lt;p&gt;&lt;a href="'.$link.'" title="'.$title.'"&gt;'.$description.'&lt;/a&gt;&lt;/p&gt;'; } ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload