Source Code:
(back to article)
<?php function get_user_name() { // Some code that retrieves the user's name from a database or other source return 'John Doe'; } $name = get_user_name() ?: 'Guest'; echo "Welcome, $name!";
Result:
Report an issue