I have a very simple question. I need to convert the date separator before inserting the date into the DB. Right now, I have 01/01/2006 and I want 01-01-2006. The dates are coming from a CSV and so are an array element. I've tried strrpos and a few other functions trying to just replace the slashes with hypens and that's not working (I think maybe because it's an array and those functions don't work on arrays?)
Could someone post example code for something like this?
I have an array called $items[3] that holds the date with the separator mentioned above. I'm sure there are several ways to do it in both php and with mysql functions but I've been stuck on it for a while and REALLY need to get through this for a project I'm working on right now.
TIA,
Adam