codeandcam.ca - Coding & Camembert – Everyday coding problems

Description: Everyday coding problems

Example domain paragraphs

I'm a web developer. I like to document the problems I run into in every day. This is my knowledge base.

Ever needed to close a bunch of open HTML tags from a string you are manipulating in PHP? I have!

Specifically in WordPress, I was using the_excerpt() function and needed to allow some tags in the excerpt, unfortunately I ended up having a bunch of un-closed tags that broke my layout. To solve this, I created a function that checks every character in the text for tags.

Links to codeandcam.ca (1)