|
Posted by comp.lang.php on 12/17/40 11:53
bobzimuta wrote:
> 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 ),
Thanx but I am using PHP 4.1.2 on one machine, PHP 4.3.2 on another
machine, PHP 4.3.9 on another machine and PHP 5.0.4 on another machine,
all test machines for building a portable web application product. So
I can't have anything specific to PHP 5.0+ without having to come up
with a PHP 4+ version, and I can't imagine a version for that, so I'm
scrapping the whole filter thing.
Thanx though
Phil
[Back to original message]
|