PHP Function for Colour Text to HEX Code

In a PHP project database, there was a text filed for colours that should be shown as a background colour of a box in front of the product name. Stored colours were like these: Blue BLUE Tomato Beech Flame Red Salmon … That some of them were not a standard colour for HTML, I searched the Internet for the colour to the HEX code table, and I added some non-standard but recurrent colours on that project like: Wood Charcol Gun Metal United Nations Blue … to this PHP function, you can add yours <?php function colourtexthex($colour_text) { // colour text to HEX code $colours = array ( ‘aliceblue’ => ‘F0F8FF’, ‘aluminium’ => ‘848789’, ‘antiquewhite’ => ‘FAEBD7’, ‘aqua’ => ’00FFFF’, ‘aquamarine’

Gheimat Site

I am happy with PHP

It was Feb 2018 that I decided to switch PHP. Because of the lovely W3Schools site, learning the PHP was easy to start. In the second week, I tried to write some codes in Notepad++, and then I started to use Eclipse. After two months, I created a simple website (Gheimat.xyz [view it on the arichive.org], a Telegram robot (https://t.me/Gheimatxyz_bot), and a WordPress plugin (Warehouse updater from an external XML for Woocommerce). For ten months, I was mostly busy with my professional online shopping system. I helped some companies to maintain their WP sites. I took more photos, passed food and industrial photography courses, and I attended professional photo editing classes. In other words, I have no free time to