Better HN
topnewbestaskshowjobs
Log inSign up

throwaway04623

2 karma · joined Jan 15, 2025 (1y ago) · 1 submissions

Submissions

comment 1y ago · link · parent

> Yes, you must copy and paste content and not having layout page is annoying at time

I think this was one of the most common usages of PHP in the beginning, at least for those who basically wrote static HTML/CSS and needed a header/footer. It was probably a gateway into more advanced dynamic pages, eventually ending up using databases and other advanced functionality.

    <?php include('header.inc'); ?>

    <p>Here's a list of my favourite movies</p>
    <ul>
       <li>...</li>
    </ul>

    <?php include('footer.inc'); ?>
It would be great if HTML had a similar capability. People have asked for it for over 30 years, so it's unlikely that it will be implemented now.