short if

$variable = (condition) ? (condition yes) : (condition no);

$data['anonymous_id'] = (isset($params['anonymous_id'])) ? trim($params['anonymous_id']) : "";

Related posts:

This entry was posted in php. Bookmark the permalink.