Find second and fourth saturday's of the month in PHP-MySql

In this section, I have created simple script in PHP to find second(2nd) and fourth(4th) Saturday of the month.

// Mysql Connection
$conn = mysql_connect('localhost','root','');
if (!$conn) {
die('Could not connect to MySQL: ' . mysql_error());
echo 'Connection OK'; mysql_close($conn);

// Select Database

// Array of the Month's

// Array of the Years's

foreach($year_array as $year)

foreach($month_array as $month)
echo $second=date('Y-m-d', strtotime("second sat of $month $year"));
echo "<br>";
echo $fourth=date('Y-m-d', strtotime("fourth sat of $month $year"));
echo "<br>";



You can use this PHP script to find second and fourth saturday of particular month and year.