PHP Snippets

Post Photo

Nice PHP function to convert images to WebP

WebP is becoming the new web standard regarding photos on the web today. PHP 7+ makes things really easy for you

PHP Snippets
tom
Saturday, 26 September 2020
Post Photo

Convert line breaks and tabs between textarea (html), PHP and CKEditor5 (Javascript)

I am using CodeIgniter 3. In order to publish code using the pre tag I had to translate line breaks and tabs when editing my posts. This is what I came up with

PHP Snippets
tom
Friday, 18 September 2020