if (strpos($location['location'],'newreply') !== false) { $activity = 'Replying'; } elseif (strpos($location['location'],'editpost') !== false) { $activity = 'Editing Post';