Delete a particular pool range from pool

How to remove a particular range from mikrotik pool using PHP API
Here is my code to set a new range in the existing pool in mikrotik

$API->write(“/ip/pool/set”,false);
$API->write(“=.id=$id”,false);
$range=“192.168.0.1-192.168.0.254,”.$start_range.“-”.$end_range;
$API->write(“=ranges=$range”);


but if I want to delete one of the ranges then how will i implement it using php mikrotik api?? :frowning: :frowning:
pls help me out!

AFAIK, there’s no MikroTik-native way to do that. You’d have to manually get the current value, explode() it, alter it, implode() it and then set the new value.