PHP解析错误,帮我修复错误

there is a mistake in this code. What's the correct code?

<?php
$guide = get_post_meta($post->ID, '_wpb_in_onda', TRUE);
if($guide){
?>
<div>
<?php echo stripslashes(htmlspecialchars_decode($guide));?>
</div>

Parse error: syntax error, unexpected $end in CODE on line 7

You can either user if:else:endif; syntax:

<?php
$guide = get_post_meta($post->ID, '_wpb_in_onda', TRUE);
if($guide):
?>
<div><?php echo stripslashes(htmlspecialchars_decode($guide));?></div>
<?php endif;?>

or what you are doing, but you need the closing if brace }:

<?php
$guide = get_post_meta($post->ID, '_wpb_in_onda', TRUE);
if($guide){
?>
<div><?php echo stripslashes(htmlspecialchars_decode($guide));?></div>
<?}; // this is missing in your code ?>

or you can echo out the HTML as well:

<?php
$guide = get_post_meta($post->ID, '_wpb_in_onda', TRUE);
if($guide){
    echo '<div>' . stripslashes(htmlspecialchars_decode($guide)) . '</div>';
}; 
?>

You don't end your if tag. Next to that it isn't really clean to break out of PHP for some HTML coding, you'd rather use the "echo" command in PHP.