Hi there,
I am trying to have a PHP variable in my link, so that my final link would look like this:
http://www.example.com/eformat/variable-goes-here.rtf
I've managed to get http://www.example.com/variable-goes-here using the code below, but I can't seem to insert the "eformat/" and ".rtf" parts. I really don't know PHP very well, so help would be greatly appreciated. Please excuse my beginner level. Thank you!
<?php $eformat = $post–>post_name; echo "<a href=\"$eformat\">Download this blog post in eFormat (.rtf)</a>" ?>
I implemented this code as well but it only gave me http://www.example.com/eformat/.rtf. I'm not sure why it refuses to recognize the variable $eformat, since the previous code above makes it work... any ideas?
<?php $eformat = $post–>post_name; echo "<a href='eformat/{$eformat}.rtf'>Link</a>" ?>