PHP echo variable not appearing correctly

I have the following

 <?php echo '<img src="/wp-content/themes/CAFC/images/cards/big/'.get_post_meta($post->ID, "bigcard", true).'" alt="'.the_title().'" />'; ?>

For some reason however my ‘the_title’ variable is appearing before my image when outputted as so…

Read More
UK Fuels Fuel Card
<img alt="" src="/wp-content/themes/CAFC/images/cards/big/ukfuels.png">

Can anybody give me an idea of where im going wrong?

Related posts

Leave a Reply

4 comments

  1. Use this instead:

    <?php echo '<img src="/wp-content/themes/CAFC/images/cards/big/'.get_post_meta($post->ID, "bigcard", true).'" alt="'.get_the_title().'" />'; ?>