# 1. Convert every character to a number using ord? # 2. ??? # 3. use modulus 100 on the converted string to get 1 or 0 if (($converted_string % 100) < $percentage) { $location = "new location"; } else { $location = "old location"; }