I would like to call on a variable outside of the php function.
I want to use my url:
www.mysite.com/and add the current date to the end of it.
I need to call on a php function to do this, therefore, I was going to do this:
$date=<?php the_date(‘Y/m/d’); ?>
Then, I want to combine my url with the date as follows:
<a href="www.mysite.com/$date">MY TITLE</a>
How do I go about doing this? Thanks.
- The topic ‘Call on a variable outside of the php function’ is closed to new replies.