Ok, here's what I want to do: my site has a ot of articles and they are all generally organized by h3 header tags for section headings (and I can clean it up to strictly enforce that). Now I am thinking that I want to add a TOC to the top of the article, in the sense of:
Each one would be a link to an anchor in the article.
So I need to 1) parse the article and add anchor tags to the headings and 2) build a TOC. I have a good idea of how to do this in other languages, but I am still pretty new to PHP and I am sure I would miss built-in functions that would help a lot. Any suggestions?
$url = 'http://localhost/php/article.php';
$raw = file_get_contents($url);
$raw = preg_replace_callback('|<h3>([^<]*)</h3>|i',
Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP. PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption. Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…