robert.access Posted July 19, 2011 Share Posted July 19, 2011 hi! please help me with "printing" date in sent email copyright. Like copy 2004 - "current year" Thank you! the code that site use to send email registration it's: <? ..... $html_message = 'hi %1$s, <br>..... <br>..... © 2009 - </font>'; ..... ?> Quote Link to comment https://forums.phpfreaks.com/topic/242321-print-date-in-php/ Share on other sites More sharing options...
Adam Posted July 19, 2011 Share Posted July 19, 2011 Getting the year itself is extremely easy, thanks to the date function -- I'll leave that part to you. Looks as though you're using sprintf on that string afterwards though, going by '%1$s'. You'll need to show us the full string and the point where you call s?printf() in order for us to help you with that. As always though, have a read of the manual and see if you can do it yourself first. If not, show us what you tried. Quote Link to comment https://forums.phpfreaks.com/topic/242321-print-date-in-php/#findComment-1244526 Share on other sites More sharing options...
robert.access Posted July 19, 2011 Author Share Posted July 19, 2011 thank you! i'll try to find it out Quote Link to comment https://forums.phpfreaks.com/topic/242321-print-date-in-php/#findComment-1244532 Share on other sites More sharing options...
robert.access Posted July 19, 2011 Author Share Posted July 19, 2011 can't get it to work... any help? if I knew to do that i wont ask here (( please. Quote Link to comment https://forums.phpfreaks.com/topic/242321-print-date-in-php/#findComment-1244541 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.