I've got a PHP shortcode for Wordpress, let's call it [myshortcode].
The shortcode allows you to enter a download URL like this [myshortcode download="http://www.example.com/file.pdf"].
I want to use this shortcode in a template file, but have the download url be a variable. Is this possible, and if so, how do I do it?
I tried these, but it doesn't work...
<?php echo do_shortcode('[myshortcode download="<?php echo $variable['dllink']; ?>"]'); ?>
<?php echo do_shortcode('[myshortcode download="echo $variable['dllink'];"]'); ?>
Any ideas?