jeudi 21 novembre 2019

if else statement gives array

I made this code to below. But it isnt working. Its giving an array. Can somebody help me with this?

<?php
$1_extra = $fields[listcheckbox_1574292451270];

if ($1_extra == "1_Hours_1") {
    include("Hours1.php");
} else if ($1_extra == "1_km_1") {
    einclude("Hours2.php");
} else if ($1_extra == "") {
    include("Hours3.php");
} else {
    include("hours4.php");
}
?>

I tried to put at the last else echo = "$1_extra"; but that gave an Array.

$fields[listcheckbox_1574292451270] is a checkbox with 2 options 1_Hours_1 & 1_km_1

If this code isn't any good, can somebody help me with it?

Thanks

Aucun commentaire:

Enregistrer un commentaire