Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

Question

How do I insert the date into the table in PHP ?

May 27, 2012 6:43PM PDT

Please Explain with example How do I insert the date into the table in PHP ?

Discussion is locked

- Collapse -
Answer
What table?
May 27, 2012 6:47PM PDT

I assume the date is the system date, but it's unclear what the table is.

Kees

- Collapse -
Answer
Also ...
May 27, 2012 7:19PM PDT

can you tell what you mean with "insert"?

Let's take Excel (or the open source equivalent Calc) as an example. If you've got a table you can insert a row, insert a column or insert a cell. And if you insert a cell you can specify if you want existing cells to shift left in the row or shift down in the column. But you can't insert a data.

So let's make this a two-step process:
1. First put the date (whatever date) in a string. http://www.w3schools.com/php/php_date.asp might be useful.
2. Then "insert the string in the table", whatever that means. I assume you know how to do that.

As a programmer, you know the importance of exact specifications. Your question is lacking those, alas.

Kees