如何在php echo + html中放置一个php echo?

Hi guys I'm trying to output the name of the blog if it's on the home page and remove the link to the home page if it's on the home page by putting different css.

I've got the below currently:

if( basename($_SERVER['PHP_SELF'], '.php') == 'index' ) {

echo '<h4 class="site-title"><a href=".esc_url( home_url( '/' ) );.">.bloginfo( 'name' );.</a></h4>';
} else {
    // Some other CSS
}
?>

The code I'm trying to convert into an echo is as per below:

<h4 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h4>

The error I currently get is:

Parse error: syntax error, unexpected 'name' (T_STRING), expecting ',' or ';' in /srv/users/serverpilot/apps/eol/public/wp-content/themes/shop-one-column/header.php on line 25

Thanks in advance!

Your echo statement should be like this:

echo '<h4 class="site-title"><a href="'.esc_url( home_url( '/' ) ).'">'.bloginfo( 'name' ).'</a></h4>';