Dropdown CustomField value remove or add

I can successfully update the values in dropdown custom field of infusionsoft via API method below:

$values = array(‘Values’ => ‘yyyy,haha,ppp’);
$response = $app1->updateCustomField(124,$values);

But I want to remove value lets say “yyyy” or I want to add “abc” after ppp.

PHP has a number of string manipulation methods built-in.

Explode the comma separated string values into an array. remove the elements you don’t want and then convert it back before updating the field with the new comma separated string.