Trying to convert something like WebsiteURL
to website_url
. I was able to convert it to website_u_r_l
using this suggestion: PHP - add underscores before capital letters
However, that doesn't work for my requirements. Having a hard time finding a better answer. Maybe the simpler solution is to convert multiple capitals in a row first, so WebsiteUrl
? Wondering what the most efficient route would be.