|
Posted by bobzimuta on 11/30/64 11:53
comp.lang.php wrote:
> [PHP]
> var $filterArray = array('reverse' => IMG_FILTER_NEGATE,
> 'edge highlight' => IMG_FILTER_EDGEDETECT,
> 'emboss' => IMG_FILTER_EMBOSS,
> 'gaussian blur' => IMG_FILTER_GAUSSIAN_BLUR,
> 'blur' => IMG_FILTER_SELECTIVE_BLUR,
> 'sketchy' => IMG_FILTER_MEAN_REMOVAL);
>
> [/PHP]
>
> I am trying to generate an HTML dropdown from this array, however, when
> I do, the value that should go in the OPTION tag literally becomes
> this:
>
> [quote]
> <option value="IMG_FILTER_EMBOSS">emboss</OPTION>
> [/quote]
Are you using PHP 5? Those are PHP 5 constants, and if they don't exist
the constant will be converted to that string. Just try var_dump(
IMG_FILTER_NEGATE ); via command line or in a script to see if the
numeric value is returned. Otherwise, I'd try wrapping the constants
like the following
'reverse' => intval( IMG_FILTER_NEGATE ),
[Back to original message]
|