1
Guys, I’m pulling data from a bank SQLSERVER
with PDO for an HTML/PHP page, I used the following code:
$query = "SELECT * FROM [BD].[Feriados]";
$stmt = $conn->query( $query );
while ( $row = $stmt->fetch( PDO::FETCH_ASSOC ) ){
print_r( $row );
}
?>
It returns me the values as follows:
> Array ( [Codigo] => 1 [Data] => 2000-01-01 00:00:00.000 [Descricao] =>
> ano novo [Fixo] => 2 ) Array ( [Codigo] => 2 [Data] => 2000-01-02
> 00:00:00.000 [Descricao] => 2 [Fixo] => 2 ) Array ( [Codigo] => 4
> [Data] => 2018-09-07 00:00:00.000 [Descricao] => INDEPENDENCIA [Fixo]
> => 1 ) Array ( [Codigo] => 11 [Data] => 2018-10-12 00:00:00.000 [Descricao] => DIA N. SRA. APARECIDA [Fixo] => 1 )
I would like to organize this data in a table in HTML, but I’m still a beginner in PHP and would like a help if someone can give me a light to treat this data.
Thank you!
Marco Lustosa, welcome, start here for a quick overview of https://answall.com/tour
– user60252
What does it mean when an answer is "accepted"? https://answall.com/help/accepted-answer
– user60252
Mark a response as it accepts https://i.stack.Imgur.com/evLUR.png
– user60252