Hi All,
I was wondering if anybody could help?
[php]
$TheStockDate = date(“Ymd”);
$format_day = substr($TheStockDate, 6, 2);
$format_mon = substr($TheStockDate, 4, 2);
$format_year = substr($TheStockDate, 0, 4);
$TheStockPeriod = "$format_day/$format_mon/$format_year TO $format_day/$format_mon/$format_year";
[/php]
Inside an IF statement I have the above…
When it inserts $TheStockPeriod into my database it shows as “$”.
If I change the line to:
[php]$TheStockPeriod = “$format_day/$format_mon/$format_year TO”;[/php]
Then it shows correctly as “04/03/2011 TO”
It appears not to like me echoing the same variable twice…
Is there anyway I can fix this?
Thanks