Hi there. Perhaps tiring question from a newbie.
Is it possible to use an output string from one function as an input for another function?
example i'm converting a color hex code to rbg values an use the as multiple input for anoher function.
$hexshizzle = "#006600";
setrgbcolor(hex2rgb($hexshizzle));
input needed is setrgb(0, 102, 0) //numeric values
output from hex2rgb is "0,102,0"
is this a valid construction? it does not seem to work.
Regards,
Rutger
Using function outputstring as multiple input
Moderator: General Moderators
- AbraCadaver
- DevNet Master
- Posts: 2572
- Joined: Mon Feb 24, 2003 10:12 am
- Location: The Republic of Texas
- Contact:
Re: Using function outputstring as multiple input
What do you mean by "output", hex2rgb() actually echos those values to the screen? You would be better to return an array of the three values from hex2rgb() and pass that to setrgbcolor(). There are other ways but they will be hackish.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.