Jump to content

superinterstellar

New Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by superinterstellar

  1. Hi, I have been trying to get a hold of PHP for a while now. I have had LAMP on my machine for one year now and I have tried to pace myself to completing the basics as quick as possible but i realize now that it's not that easy. I am now starting to realize that the basics(ie. while, for, if/then, arrays etc) are very important and pacing through them is not a good idea and rigourous practicing is very important. I would like some feedback on people here got started on php? Did you read any books or did you just start coding? Appreciate if someone could share their experience here. Thanks Kevin
  2. @Chocu3r Thanks a tonne! Didnt know I culd explode as new lines! Nor did I know about all the addtional useful functions. Really appreciate it and hope you could advise on how to get better. I am a newbie here. Any reading material or tutorial would be nice. Thanks Kevin
  3. @gizmola These are inputs from a html textarea input for dates in dd.mm.yy format. (It allows you to list all the dates you wish to convert. You have to list them all) . T The reason why I am making this is because I have a colleague who has listed all his dates in excel in dd.mm.yyyy format and I want to convert them all into yyyy-mm-dd by copying all the dates and pasting them into the html textarea. Then the php script will take all the dates listed and covert them one by one into YYYY-MM-DD format. After each date is converted it will have a break tag so that all the dates look in 1 orderly line. I hope this makes more sense?
  4. the reason why i want to loop it because on the html form it will have all the dates coming in a straight line. The html input(textarea) will go in like this:- ... 21.03.15 22.03.15 22.04.15 25.04.15 ... When the results are printed I need a break tag for each date that is printed out, 2015-03-21 2015-03-22 2015-04-22 2015-05-25 Hope this makes sense? Thanks Kevin
  5. Hi, I am trying to loop a code(my php skills are not that great, so appreciate if someone here could help me walk through how to loop my code) I have date input in the format as 21.03.15(DD.MM.YYYY) and would like to have it in 2015/03/21(YYYY/MM/DD) . Note: I have a html textform that will get all the dates added to it , it will be in the following format:- 21.03.15 22.03.15 22.03.15 I would like it to come out as : 2015/03/21 2015/03/22 2015/03/22 Below is some things I came up with, but I cannot seem to come up with a looping logic. Appreciate if someone here could help me with the code below. Thanks! <?php $var = "21.03.15" ; echo $var; echo "<br />"; $date = explode(".",$var); // echo "20".$date[2].'/'.$date[1].'/'.$date[0]; ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.