RE: [PHP] Is gd present?

2003-06-05 Thread Ford, Mike [LSS]
-Original Message- From: Esteban Fernandez [mailto:[EMAIL PROTECTED] Sent: 04 June 2003 16:09 Also works... :) ?php $array = get_loaded_extensions(); for ($i=0;$i=count($array);$i++) { if (gd == $array[$i]) $installed = true; else $installed = false; } This will only

RE: [PHP] Is gd present?

2003-06-05 Thread Ford, Mike [LSS]
-Original Message- From: Svein Larsen [mailto:[EMAIL PROTECTED] Sent: 04 June 2003 16:22 $gd_loaded = (extension_loaded('gd'))?1:0; Well, this also fails the simple-as-possible test: if the value returned by extension_loaded() can be used to drive the ?: operator, it must be

Re: [PHP] Is gd present?

2003-06-05 Thread Svein Larsen
Thats true, but its more overhead calling a function than compare a variable. Thats why i want to calll the function only once. - Svein On Thursday 05 June 2003 14:03, Ford, Mike [LSS] wrote: -Original Message- From: Svein Larsen [mailto:[EMAIL PROTECTED] Sent: 04 June 2003 16:22

Re: [PHP] Is gd present?

2003-06-05 Thread CPT John W. Holmes
$gd_loaded = (extension_loaded('gd'))?1:0; Well, this also fails the simple-as-possible test: if the value returned by extension_loaded() can be used to drive the ?: operator, it must be evaluable as a Boolean; this means you can use it directly for later use in an if() or similar

Re: [PHP] Is gd present?

2003-06-05 Thread CPT John W. Holmes
Is there a way to check within an application if the gd library has been installed? Maybe get_loaded_extensions() ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Is gd present?

2003-06-05 Thread Esteban Fernandez
Also works... :) ?php $array = get_loaded_extensions(); for ($i=0;$i=count($array);$i++) { if (gd == $array[$i]) $installed = true; else $installed = false; } if ($installed = true) echo yeah... GD installed; else echo shit.. GD not installed.; ? Regards. EF. Cpt John W. Holmes [EMAIL

Re: [PHP] Is gd present?

2003-06-05 Thread Armand Turpel
PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 4:11 PM Subject: Re: [PHP] Is gd present? Is there a way to check within an application if the gd library has been installed? Maybe get_loaded_extensions() ---John Holmes... -- PHP General Mailing List (http

RE: [PHP] Is gd present?

2003-06-05 Thread Svein Larsen
$gd_loaded = (extension_loaded('gd'))?1:0; Then you can use if ($gd_loaded) later in your code. - Svein -Original Message- From: Esteban Fernandez [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 17:09 To: [EMAIL PROTECTED] Subject: Re: [PHP] Is gd present? Also works

Re: [PHP] Is gd present?

2003-06-05 Thread Esteban Fernandez
: Wednesday, June 04, 2003 17:09 To: [EMAIL PROTECTED] Subject: Re: [PHP] Is gd present? Also works... :) ?php $array = get_loaded_extensions(); for ($i=0;$i=count($array);$i++) { if (gd == $array[$i]) $installed = true; else $installed = false; } if ($installed = true) echo