Answer the question
In order to leave comments, you need to log in
PHP not seeing function?
Good day! There is such a code, when I put it in a function (function), then this code, when the function is declared, stops working. Maybe someone knows what the problem is. Thank you.
<?php
$result_set = mysqli_query($connect, "SELECT * FROM `newCity`");
while ($row = $result_set->fetch_assoc()) {
$result_set = mysqli_query($connect, "SELECT * FROM `new_test_table` WHERE `newCity` = '".$row["city"]."'");
while ($row_1 = $result_set->fetch_assoc()) {
echo "<option>".$row_1["newDistrict"]."</option>";
}
}
?>
Answer the question
In order to leave comments, you need to log in
The internal vanga says that the problem is in the visibility of variables in general and $connect in particular.
error output? no, have not heard.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question