Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

40,003 questions

51,950 answers

573 users

How to convert RGB from array to hex in PHP

1 Answer

0 votes
$rgbarr = array(253, 10, 99);

echo sprintf("#%02X%02X%02X", $rgbarr[0], $rgbarr[1], $rgbarr[2]);

   
   
   
/*
run:
    
#FD0A63
    
*/

 



answered Dec 29, 2021 by avibootz

Related questions

2 answers 345 views
3 answers 349 views
349 views asked Sep 2, 2015 by avibootz
1 answer 50 views
1 answer 103 views
2 answers 101 views
2 answers 71 views
2 answers 80 views
...