I'm trying to figure out how I can remove the Day and Month from this variable as it's looped. I've tried several strtotime() functions but I can't get the syntax quite right.
foreach ( $results as $result) {
echo $result->date . "<br />";
}
Shows dates like this:
2014-09-03
2013-09-09
2011-06-01
How can I reassign the variable $result->date so that it only shows the Year like this:
2014
2013
2011