Hi
I'm trying to put a dynamic number of elements into an array from an mysql-base. (Using Postnuke-CMS and creating a module for it)
Senario.
MySQL-table
Modulevariables
Fieldname => data
Allowextension => .jpg .png .bmp
PHP-code
$screenshot_extensions = array(pnModGetVar($ModName,Allowextension'));
Now.. I can extract the data as needed but I have some PHP-code that cannot check up on the array-string.
When I only have one extension in the data-field it works, but when I have more than one - no way.
I'm using this checkup to search the array
if (in_array($dumpext,$screenshot_extensions))
I believe the problem is in the array from the MySql data, but how to solve it?? Perhaps You know.
I found a way to work around it, had to convert the string to an array
$screenshot_extensions = pnModGetVar($ModName,'screenshot_extensions');
$screenshot_extensions = explode(" ",$screenshot_extensions);