Here is the answer of the question: Assume that $r is 255, and $g and $b are both 0. What is the correct code to output “#ff0000”?
- printf(‘#%2x%2x%2x’, 255, 0, 0);
- printf(‘#%2X%2X%2X’, $r, 0, 0);
- printf(‘#%x%x%x’, 255, 0, 0);
- printf(‘#%02x%02x%02x’, 255, 0, 0);
The above question is related to “LinkedIn PHP Skill Quiz“. You can find all the updated questions and answers related to to “LinkedIn PHP Skill Quiz” on the “LinkedIn PHP Skill Quiz” page. If you find the update in question or answers, do comment on this page and let us know. We will update the answers as soon as possible.
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.