$string = "a%3A2%3A%7Bi%3A0%3Bs%3A3%3A%22489%22%3Bi%3A1%3Bs%3A32%3A%22a85a44c1881523798bc155a5369e1226%22%3B%7D"
How would I empty $string if it contained more than ten % characters? In other words $string = "a%3A2%3A%7Bi%3A0%3Bs%3A3%3A%22489%22%3Bi%3A1%3Bs%3A32%3A%22a85a44c1881523798bc155a5369e1226%22%3B%7D" Would be emptied, while $string = "a%3A2%3A%7Bi%3A0%3Bs%3A3%3A%22489%22" would not.