PHP function to create RSS-feed (is this good?)

In order to create RSS-feeds that are available for specific days of the week, I created a function that takes parameters and, if today’s date is equivalent to the day in the function, the RSS feed is created. The function works, and if you want to create 20 RSS-feeds, you’d have to instantiate the function twenty times. Is this a good way to create RSS-feeds? I’m thinking there are better ways, I’m thinking this way wastes too much CPU.

I’s not needed to show the function, because it’s about the idea, but just in case:

$feed_day = function ($title, $link, $desc, $lang, $copyright, $day)  {
			$today_date = strtolower(date('l'));
			$day = strtolower($day);
			if ($today_date == $day) {
				echo '<item>
						<title>'. $title . '</title>
						<link>' . $link . '</link>
						<description>' . $desc . '</description>
						<language>' . $lang . '</language>
						<copyright>' . $copyright  . '</copyright>
			} else {
				echo 'not working';
			}/* end of if */
		}; /* end feed_day */
			$feed_day('testing3', '', 'desc2', 'en-us', '2015', 'tuesday');

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.