preg_quote will take care of escaping strings that appear as part of regular expressions -- not just "/" but other regexp special characters like []*+. and the rest.