RE: [PHP] Convert to int...?

From: Date: Wed, 22 Aug 2001 15:20:21 +0000
Subject: RE: [PHP] Convert to int...?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-63912@lists.php.net to get a copy of this message
(int)$siz will give you what you are looking for. although with the math below, you are going to end up with 0. $siz = 72 / 160; //returns 0.45 echo round($siz); //returns 0 echo (int)$siz; //returns 0 -----Original Message----- From: Seb Frost [mailto:seb@raceshoot.com] Sent: Wednesday, August 22, 2001 10:07 AM To: php-general@lists.php.net Subject: [PHP] Convert to int...? I didn't think php was this fussy, but the following code seems to not work because the numbers are floats. round() doesn't seem to help either: $siz=(72/160)*GetImageWidth($fileID); $offx=(8/160)*GetImageWidth($fileID); $offy=(1/2)*GetImageHeight($fileID); ImageTTFText ($im, $siz, 0, $offx, $offy, $red, "cour.ttf", "PROOF"); Works fine if I just put "$siz=72;" etc - seb -----Original Message----- From: Tribun [mailto:mail@tribun.de] Sent: 16 August 2001 08:30 To: php-general@lists.php.net Subject: [PHP] .htaccess username ...hmmm, I would guess there is a way, but I dont know why... Can I read out the active username, which has just logged in through a .htaccess authentication??? Like the access data.. user: patrick pass: linux can PHP reads out the usersname "patrick" ?? (and if ,... how? ;) 10x 4 U'r time. Patrick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#63912) next »