Find every Sunday between two dates

I have $fromdate and $todate variables. I want a function that can calculate the dates of each Sunday existing in between $fromdate and $todate in PHP.

Find every Sunday between two dates