How does PHP display SQL query results through an array? There are multiple query results, as shown in the figure. I want the $date in the echo in forsearch to be an array. Instead of using $date directly, output $date[start], $date[start], $date[goal], $date[airline], $date[flight-no] separately. ,$date[voyage],
$date[transit_airport],$date[_45kg],$date[_100kg],, $date[_300kg],$date[_500kg],`$date[_1000kg] ,`$date[remarks],$date[exp]. Because I want to receive each input value using PHP instead of using a table to display the output, I want to submit the query results to other pages. Is there any way to achieve this? Now my output shows tart`, `goal`, `airline`, `flight_no`, `voyage`, `transit_airport`, `_45kg`, `_100kg`, `_300kg`, `_500kg`, `_1000kg`, ` remarks`, `exp`, are not defined.
You can first convert the $date array to a string, pass it to other pages, and then convert the string to an array for other pages; for example: $strArray = implode(",", $date);// Pass $strArray to other pages The page is fine // Inside is "tart, goal, airline, flight_no, voyage, transit_airport, _45kg, _100kg, _300kg, _500kg, _1000kg, remarks, exp"
The other pages will be received and then converted into dimensional arrays: $date = explode(",",$strArray);// $date is an array;