View Single Post
Old 12-04-2007, 08:25 PM   #3 (permalink)
Wildhoney
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

Exceedingly useful! I was dabbling with GD the other day - more specifically, using the Windows COM component in PHP to take a screen-shot of a given website. It's something I've wanted to do for a while but finally got around to taking a closer look on how to do it without diving into the C world.

Can I be a bit of a pig though and point out an easier way to do the values at the start? Not that it makes much difference, just an easier way to do it. If you add the values to an array, you can then use array_sum to plus them all together:

php Code:
$aValue[] = 45;
$aValue[] = 78;
$aValue[] = 121;
$aValue[] = 255;

var_dump(array_sum($aValue));
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote