foreach loop with $value didnot work together with sqlselect where $value
Clash Royale CLAN TAG #URR8PPP foreach loop with $value didnot work together with sqlselect where $value I made foreach loop for index array to print a table. $value is also used for echo some values from next associative array(s)... I would use $value for MySQL select table where var $value is used for WHERE parameter. But nothing happend. Maybe could someone find the bug. Im helpless now, Im working on it last 14 hours and my brain is usless now. Can somebody help please? Its all in this part of code: foreach ($seraz_soupis_pot as $key => $value) { $sqlshowpotraviny = "SELECT nazev, jednotka, jednotkajeg FROM ft_potraviny WHERE nazev = $value"; $resultshowpotraviny = mysqli_query($link, $sqlshowpotraviny); $rowshowpotraviny = mysqli_fetch_assoc($resultshowpotraviny); if ($rowshowpotraviny['jednotka'] == "g") { $nasobek = ""; $jednotka = ""; ...