How to add “Download file” link in Drupal 7 files attachment when chosen table formatter
use File Force Download module to add download functionality to your site. It has field formatter, views integration, good api and etc..

If you want to create a download link programmatically then you can generate download link such way: 

l('Linktext', file_force_create_url($image['filepath']), array('query' =&gt; array('download' =&gt; '1'))).