PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi, i must port a website from ASP to PHP. Im not very familliar with PHP and now I'm stuck with the translation.
[syntax="asp"]alt_txt = "Reminder " & WeekDayName(WeekDay(sDate)) & " ( " & Day(sDate) & ")" & MonthName(Month(sDate)) & " " & Year(sDate)
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Assuming it's vbscript code, the snip will populate a string variable named alt_txt by parsing a variable sDate, presumably a string representation of the date value. alt_txt will end up with a string
"Reminder Tuesday (30) Oct 2007" if sDate contained "10/30/2007" (in US format).
It's going to depend alot on how $sDate is formatted (and if it is uniformly formatted), but yeah .. something like the following could be along the lines of what you want.