function isAdmin($user) { if($user['role'] == 'admin') { return true; } else { return false; } }
function deleteContent($user, $contentId) { if(isAdmin($user)) { //delete content from database } else { echo "You do not have permission to delete this content."; } }The isAdmin function is a custom function, usually created and used within the context of a specific web application or system. It is not part of any specific package or library.