this made me think a little.. this will work:
$self = ereg_replace("(\?\&menuitem=[ ]*)([0-9])", '', $self);
thanks for the idea Alan.. This leaves me an other question.. would it be possible to change the [0-9] part in a way that it matches everything till a specific char??
example:
http://host.com/file.php?menuitem=pla%20ap&othervar=value&menuitem=pla%20ap
then i want to remove &menuitem=* (&menuitem=pla%20ap in this case)
from the line..
Jordy Querner