DEV Community

John Ellee Robado
John Ellee Robado

Posted on

2

Table Head using foreach loop in PHP

HTML


ID Number
Name
Birthday
Address
Course

PHP
<?php

$info = "ID Number, Name, Birthday, Address, Course";
$data = explode(',', $info);
foreach ($data as $row) {
echo "

".$row."";
}
?>

In PHP, the lines of code of HTML will reduce down

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay