$stmt = $conn->prepare("UPDATE stopwatch SET $array[0] = ......
$stmt->execute();
doing $array[0]
works fine in my sql command, but i want an variable in my array parameter like $array[$value]
doing this doesn’t work.
To explain a bit i want to do an sql commmand that use a php get methode and the variable that i get from the get methode i want to put in an array like that:
$value = $_GET['value']; // value = 2 for example
$ID = array("t_inter_1", "t_inter_2", "t_inter_3", "t_arrivee");
echo $ID[$_GET['value']]; // works fine
echo $ID[$value]; // works fine
but doing this in my sql command doesn’t work. I don’t know what am i supposed to do, and I don’t know what I am doing wrong, thanks for the help