how to save the variable from query in mysql with php

Solutions on MaxInterview for how to save the variable from query in mysql with php by the best coders in the world

showing results for - "how to save the variable from query in mysql with php"
Aniyah
05 Nov 2019
1$result = $db->query('Select `Name`, `Age`, `Color` from `People` ');
2while ($rows = $result->fetch()){
3$Name = $rows['Name'];
4$Age = $rows['Age'];
5$Color = $rows['Color'];
6}
7
Jack
04 Aug 2016
1<p>
2Hello, my name is <?php echo $Name; ?>. 
3I am <?php echo $Age; ?> years old and my favorite color is <?php echo $Color; ?>.
4</p>
5