how do i rewrite the following code using the ternary operator
if ( isset( $page_title ) ) {
echo $page_title;
} else {
echo 'Welcome to Auto-Zim';
}
thanks in advance
echo isset($page_title) ? $page_title : 'Welcome';
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.