RE: [PHP] 2 NEWBIE QUESTIONS

From: Date: Wed, 22 Aug 2001 23:44:23 +0000
Subject: RE: [PHP] 2 NEWBIE QUESTIONS
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-63982@lists.php.net to get a copy of this message
1) strftime("%T on the %D", strtotime($yourdate)); Should produce: 00:12:45 on the 08-22-2001 You can check the manual page for strftime() to see different ways to format the time to your liking: http://www.php.net/manual/en/function.strftime.php 2) The way you're trying to do that sounds a bit unnecessary, but take a look at eval() http://www.php.net/manual/en/function.eval.php -----Original Message----- From: Georgie [mailto:georgiecasey@e-merge.ie] Sent: Wednesday, August 22, 2001 7:17 PM To: php-general@lists.php.net Subject: [PHP] 2 NEWBIE QUESTIONS 1) Is there any PHP command that'll convert a MySQL database timestamp into a format that humans can read?!! For example, I want to change "20010822001245" into "00:12.45 on the 22-08-2001"? 2) This is the hard question. I have a script that gets values from a database and then includes a php page which contains "echo $variable" code to get the values from the database onto the page. What I want to do is have the PHP page code in the main script instead of being included externally. So i tried putting the code into a variable and then including, but it didnt work. Then I tried echoing the variable but the PHP code isnt executed. If you dont fully understand my question, mail me. I'm really stuck and NEEDD HELP!!! TIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#63982) next »