<?php

$cookie= "5100/5101/5102";

$novovalor= join('/',array_diff(explode('/', $cookie), array('5101')));

echo $novovalor;