I have a function call rsstotime
function rsstotime($rss_time) { // convert to unix timestamp}
if I call it like this:
$time = rsstotime('Wed, 05 Aug 2015 11:21:00 BST');
//returns 1438773660 the correct timestamp
If I call it like this
$pub = 'Wed, 05 Aug 2015 11:21:00 BST';
$time = rsstotime('$pub');
//returns 946598400
I'm guessing the string $pub is being converted instead. I thought I could pass a variable into a function like that?