"; $q = "select id, ConfURL,country,city,Dates,Title,date,field,ShortName from editConference where up = '2' AND ShortName <>'' AND confvenue ='ConferenceSeries' ORDER BY date DESC"; //echo $q; $select_result = mysqli_query($con,$q); while ($row = mysqli_fetch_assoc($select_result)) { $thisyear = date('Y'); /* 06-08-2021 kesava updated */ if (strpos($row['date'], '2023') !== FALSE) { if ($row['date'] < date('Y-m-d')) $pre2023_confs[] = $row; } if (strpos($row['date'], '2022') !== FALSE) { if ($row['date'] < date('Y-m-d')) $pre2022_confs[] = $row; } if (strpos($row['date'], '2021') !== FALSE) { if ($row['date'] < date('Y-m-d')) $pre2021_confs[] = $row; } if (strpos($row['date'], '2020') !== FALSE) { if ($row['date'] < date('Y-m-d')) $pre2020_confs[] = $row; } /* 06-08-2021 */ if (strpos($row['date'], '2019') !== FALSE) { if ($row['date'] < date('Y-m-d')) $pre2019_confs[] = $row; } if (strpos($row['date'], '2018') !== FALSE) { if ($row['date'] < date('Y-m-d')) $pre2018_confs[] = $row; } if (strpos($row['date'], '2017') !== FALSE) { if ($row['date'] < date('Y-m-d')) $pre2016_confs[] = $row; } if (strpos($row['date'], '2016') !== FALSE) { if ($row['date'] < date('Y-m-d')) $pre0_confs[] = $row; } if (strpos($row['date'], '2015') !== FALSE) { $pre1_confs[] = $row; } if (strpos($row['date'], '2014') !== FALSE) { $pre2_confs[] = $row; } if (strpos($row['date'], '2013') !== FALSE) { $pre3_confs[] = $row; } if (strpos($row['date'], '2012') !== FALSE) { $pre4_confs[] = $row; } if (strpos($row['date'], '2011') !== FALSE) { $pre5_confs[] = $row; } } function cmp($a, $b) { if (strtotime($a['date']) == strtotime($b['date'])) { return 0; } return (strtotime($a['date']) < strtotime($b['date'])) ? 1 : -1; } function slugify($text) { // replace non letter or digits by - $text = strip_tags($text); $text = preg_replace('~[^_^\\pL\d]+~u', '-', $text); // trim $text = trim($text, '-'); // transliterate $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text); // lowercase $text = strtolower($text); // remove unwanted characters $text = preg_replace('~[^-\w]+~', '', $text); if (empty($text)) { return 'n-a'; } return $text; } function showtitle($text) { // replace non letter or digits by - $text = ucwords(strip_tags($text)); if (strpos($text, ' On ') !== false) { $text = str_replace(" On ", " On ", $text) . ""; } else $text = "" . $text . ""; return $text; } usort($pre2018_confs, "cmp"); usort($pre2016_confs, "cmp"); usort($pre0_confs, "cmp"); usort($pre1_confs, "cmp"); usort($pre2_confs, "cmp"); usort($pre3_confs, "cmp"); ?>