 |
Smarty
The discussions here are for Smarty, a template engine for the PHP programming language. Dedicated server web hosting provided by Guru-host.eu. |
| View previous topic :: View next topic |
| Author |
Message |
pierrot10 Smarty n00b
Joined: 08 Apr 2012 Posts: 4
|
Posted: Mon Apr 09, 2012 6:23 pm Post subject: How can I slit a data into variable |
|
|
Dear All,
I need to sepearate a viable into several
This is my varaible {$deal_end} (2012-04-12 18:21:40)
Because I am unsing a javascript fonction I need to slit it like this
{$year_end} //2012
{$mount_end} // 04
{$day_end} //10
{$hour_end} //18
{$min_end} //21
{$sec_end} //40
And then to use it in a javascript variable
<script>
dateTo = new Date({$year_end}, {$mount_end}-1, {$day_end},{$hour_end},{$min_end});
But my problem, I do not know how to slipt it into several varaible?
Someone can help me?
Cheers
</script |
|
| Back to top |
|
pierrot10 Smarty n00b
Joined: 08 Apr 2012 Posts: 4
|
Posted: Mon Apr 09, 2012 6:42 pm Post subject: |
|
|
I found the alternative solution and it works fine
| Code: | | dateTo = new Date({$deal_end|date_format:"%Y,%m-1,%d,%H,%M,%S"}); |
|
|
| Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|