PHP - Problems calling a function with parameters
<p>I need to call a function, in PHP, that accepts 3 parameters, RGB Values. This function converts RGB color values to HSL values, so <code>(R,G,B)</code> is needed in the parenthesis.</p>

<p>This is my function:</p>

<pre><code>function RGBtoHSL($red, $green, $blue) {
  // convert colors
}
</code></pre>

<p>Which, if I make a test call of the following, it works just fine:</p>

<pre><code>RGBtoHSL(255,0,0);
</code></pre>

<p>and also works like this:</p>

<pre><code>RGBtoHSL(255,000,000);
</code></pre>

<p>Now, further down my page I have a variable <code>$displayRGB</code> which holds the current pixels RGB values in this format <code>xxx,xxx,xxx</code>. I've echoed this variable to test the format matches my requirements and it does, but when I try and add this variable to my function caller, it fails with the error "Missing argument 2, Missing argument 3" and points to this line:</p>

<pre><code>RGBtoHSL($displayRGB);
</code></pre>

<p>I'm still teething in PHP (come from ASP), can somebody please help point me in the right direction and pass me my dummy?</p>
