Skip to content

winofsql/php-pdo-select-basic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php-pdo-select-basic

社員マスタ => https://github.com/winofsql/sql-syain

db-select-01-array.php

image

db-select-02-heardoc.php

結果の HTML をヒアドキュメントで作成し <?= $html ?> で埋め込みます

$html = "";
while ($row = $statement->fetch(PDO::FETCH_ASSOC)) {

    $html .= <<<HTML
    <tr>
        <td>{$row["氏名"]}</td>
        <td>{$row["フリガナ"]}</td>
        <td>{$row["給与"]}</td>
        <td>{$row["手当"]}</td>
        <td>{$row["生年月日"]}</td>
    </tr>
HTML;

}

image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages