RE: [PHP] Problem!

From: Date: Tue, 30 Jan 2001 02:47:08 +0000
Subject: RE: [PHP] Problem!
Groups: php.general 
Request: Send a blank email to php-general+get-37223@lists.php.net to get a copy of this message
if you are sure $date will *always* be of the same format: function date_manipulator($date=0) { Global $year,$day,$month; // I should update your variables from a previous call, if you don't need it - don't use it ... if($date!=0) { $year = substring($date,0,4); $month = substring($date,4,6); // you mean that the month follows the year? (not clear in your example) $day = substring($date,6,8); return "Today's date is $day $month $year"; or use mktime() etc ... } } Cheers, Maxim Maletsky -----Original Message----- From: Fredrik Arild Takle [mailto:ftakle@online.no] Sent: Monday, January 29, 2001 4:32 AM To: php-general@lists.php.net Subject: [PHP] Problem! 1. $date = "20010101"; How could I output 01 01 2001 (or make it 3 variables, like day, month, year)? 2. What is the best way to encrypt (using PHP and MySQL)? Could you please answer me directly by mailadr. (ftakle@online.no), because I'm currently not a member of this list at home! --------------------------------- Fredrik A. Takle fredrik@takle.net

« previous php.general (#37223) next »