MCQs > IT & Programming > PHP > How would you fall back on the default value of 'Unknown', if a request-parameter is missing or empty?

PHP MCQs

How would you fall back on the default value of 'Unknown', if a request-parameter is missing or empty?

Answer

Correct Answer: $name = (!empty($_GET['name'])? $_GET['name'] : ''Unknown'');

Explanation:

Note: This Question is unanswered, help us to find answer for this one

PHP Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

PHP Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it