Hi all of this is wordpress php question I'm looking to get thumbnail from custom area image. Help me using the code many thanks.

<?php
if (get_post_meta($post->ID, 'thumbnail', true)) {
echo "<img src='echo get_post_meta($post->ID, 'thumbnail', true)' width='100px' />";
}else{
echo "<img src='http://site.com/default.jpg' width='50px' />";
}   
?>

Above code results default pic where custom area image isn't added but is supplying img code proven below as output for custom filled image.

<img src='echo get_post_meta(86, ''thumbnail'', true)' width='100px' />

The issue probably is you come with an echo statement inside another echo statement.

<?php
if (get_post_meta($post->ID, 'thumbnail', true)) {
echo "<img src='" . get_post_meta($post->ID, 'thumbnail', true) . "' width='100px' />";
}else{
echo "<img src='http://site.com/default.jpg' width='50px' />";
}   
?>