getTierOne() works fine with PHP 5.6 but not with PHP7.4 and the javascript keep running none stop (loop). Where am i getting it wrong? i want to migrate from PHP5 to PHP7. below is the line of code.
$sql = "SELECT * FROM year order by year, year_value";
$query = mysqli_query($conn, $sql) or die(mysqli_error());
while($tier = mysqli_fetch_array( $query ))
{
echo '<option
value="'.$tier['year_value'].'">'.$tier['year_desc'].'</option>';
}
}
//**************************************
// First selection results //
//**************************************
if($_GET['func'] == "drop_1" && isset($_GET['func'])) {
drop_1($_GET['drop_var']);
}
function drop_1($drop_var)
{
$temp_var1 = $drop_var[1];
$temp_var2 = $drop_var[2];
if(strlen($drop_var)>3){
$temp_var1 = $drop_var[1].$drop_var[2];
$temp_var2 = $drop_var[3];
}