Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8855557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:09:48+00:00 2026-06-14T14:09:48+00:00

The RSS feed I read from was recently updated and messed up quite a

  • 0

The RSS feed I read from was recently updated and messed up quite a few things, I fixed most of the issues but this I can’t figure.

How the date was formatted previously:

<div>
    <div>
        <div>
            13 </div>
    </div>
</div>
<div>
    <div>
        <div>
            July </div>
    </div>
</div>
<div>
    <div>
        <div>
            2012 </div>
    </div>
</div>

How it is right now:

<div>
    <div>
        <div>13th July, 2012</div>
    </div>
</div>

So:

  1. Day Month and Year has to be separated in their own DIVs (most difficult)
  2. “th” and “,” needs to be removed (this is easy with str_replace)

Now the problem is I could do this with jQuery in minutes but it has to be done with PHP before it gets saved, and since the divs have no class/id its even more difficult for me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T14:09:49+00:00Added an answer on June 14, 2026 at 2:09 pm

    You can use strip_tags in PHP to get the date and then use strtotime to normalize the date.

    Then you can generate whatever HTML you want.

    EDIT: here is your solution:

    <?php
    //at this point, $string = the input you wish to modify
    $string = "
    <div>
        <div>
            <div>13th July, 2012</div>
        </div>
    </div>
    ";
    
    //get normalised time
    $time = strtotime(trim(strip_tags($string)));
    
    //with normalised time, generate your new output
    echo "
    <div>
        <div>
            <div>
                ".date("d",$time)." </div>
        </div>
    </div>
    <div>
        <div>
            <div>
                ".date("F",$time)." </div>
        </div>
    </div>
    <div>
        <div>
            <div>
                ".date("Y", $time)." </div>
        </div>
    </div>
    ";
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So in short my case is this: Read data from RSS feed Print content
I'm trying to read an RSS feed from Flickr but it has some nodes
I'm trying to read a few RSS feed details from a XML file with
I want to read and save some data from this rss feed to in
Got a partial answer from searching in this thread: Viewing raw RSS feed? But
I was writing a generic class to read RSS feed from various source and
I'm displaying a list of products as read off of the RSS feed from
I am trying to read data from an RSS feed which has 25 items.
I keep getting this error randomly when trying to read ARSTECHNICA RSS feed. I
I have a php code like this which mainly fetch rss feed from a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.