I am trying to echo html and php in a string but I get a syntax error with the code below.
$post_title .= '
<div id="show_neil" class="box five columns" data-target="#member_neil">'.
'<h4 class="name">'.
'<img src="' . get_bloginfo('template_directory') . '/img/team/neil.png">'.
.get_the_title($post_id).
'</h4>'.
'</div>
';
How do I echo this?
;) at the end of that (which shouldn't bother as long as there is nothing after that, but I suspect that there is more code after this). Second, what does bloginfo return? Third: what syntax error is it throwing?.) (after seeing your edit) after'/img/team/neil.png">'. Just remove it and you will be done. In a nutshell, replace'<img src="' . get_bloginfo('template_directory') . '/img/team/neil.png">'.with'<img src="' . get_bloginfo('template_directory') . '/img/team/neil.png">'. Besides, you should start to find different ways to concatenate strings. PHP offers tons of ways to concatenate elements and the one you're using is odd and hard to read and mantain.