How to insert any character in String
Posted: Fri Oct 06, 2006 11:16 pm
Hello,
I have a probelm in PHP. so plz help me.
In DB, i have an field called 'request_date'. Its type is 'varchar'
it gives result in that format:
27092006_1
27092006_2
28092006_1
28092006_2
28092006_3
here the values that comes before the underscore is the 'DATE' when that this record is inserted in DB.My requiement is that to show the current date,so for this i use explode function like
after that i got date in that format:
27092006
27092006
28092006
28092006
28092006
Now to display proper date, i want to add dashes in date like
27-09-2006
27092006
28-09-2006
28-09-2006
28-09-2006
HOW CAN I ADD THESE DASHES. plz help me in this regard.
THanks
Eshban
I have a probelm in PHP. so plz help me.
In DB, i have an field called 'request_date'. Its type is 'varchar'
it gives result in that format:
27092006_1
27092006_2
28092006_1
28092006_2
28092006_3
here the values that comes before the underscore is the 'DATE' when that this record is inserted in DB.My requiement is that to show the current date,so for this i use explode function like
Code: Select all
$trip_post_date = explode("_",$rst_trip['request_date']);27092006
27092006
28092006
28092006
28092006
Now to display proper date, i want to add dashes in date like
27-09-2006
27092006
28-09-2006
28-09-2006
28-09-2006
HOW CAN I ADD THESE DASHES. plz help me in this regard.
THanks
Eshban