As people pointed out, your current calculations don't add up to 452.

What I'm reading here is that you want an image gallery with 3 rows (do you mean 
columns since you're talking width?) with borders on the images.  Maybe you're 
calculating the width to use for your table or something.

If this is the case, I'd change:

------------------------
$galleryRow
... to ...
$galleryCol
------------------------

..just to keep it straight, and I'd change:

------------------------
$contentwidth = ($imagediv * 3);
... to ...
$contentwidth = $imagediv * $galleryCol;
------------------------

But looks like your script does what you want it to do.  

If you work your answer backwards and divide 452 by 3 you get 150.67, so I don't know 
what you did to get that, but I'm thinking you just mis-typed something somewhere.  
The script looks fine by itself for what it seems to be intended for.

-TG

> -----Original Message-----
> From: Lenny Davila [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, June 02, 2004 9:24 PM
> To: 'php windows'
> Subject: [PHP-WIN] calculations
> 
> 
> I have in my php code:
> 
> $galleryRow = 3;
> $maxwidth = 144;
> $borderwidth = 2;
> $imagediv = ($maxwidth + (2 * $borderwidth));
> $contentwidth = ($imagediv * 3);
> 
> The output of contentwidth should be : 452
> But it comes out as 444.  Does anyone know what I am doing wrong?
> TIA
> ------------------------------------
> Eleno Davila
> [EMAIL PROTECTED]
> (877)933-6750 Ext 163 (direct line)
> http://plasticsurgery.com 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to