In a CMS I have a variable that contains image id(s).
$article[‘Image’]
Value can be a single image id number like 5 or multiple id’s separated with commas like 12,19,23.
Then I have a plugin for the cms that uses this variable, but fails in case of multiple image ids.
This plugin only needs to use one image id, so how could I trim the multiple id value to one id?
For example single value 5 would stay as 5, but 12,19,23 would be trimmed to the first number 12.
Any help would be appreciated, thanks.