05.05.2013 Views

Programming PHP

Programming PHP

Programming PHP

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

crypt<br />

string crypt(string string[, string salt])<br />

Encrypts string using the DES encryption algorithm seeded with the two-character salt<br />

value salt. Ifsalt is not supplied, a random salt value is generated the first time crypt( ) is<br />

called in a script; this value is used on subsequent calls to crypt( ). Returns the encrypted<br />

string.<br />

current<br />

mixed current(array array)<br />

Returns the value of the element to which the internal pointer is set. The first time current( )<br />

is called, or when current( ) is called after reset, the pointer is set to the first element in the<br />

array.<br />

date<br />

string date(string format[, int timestamp])<br />

Formats a time and date according to the format string provided in the first parameter. If<br />

the second parameter is not specified, the current time and date is used. The following<br />

characters are recognized in the format string:<br />

a “am” or “pm”<br />

A “AM” or “PM”<br />

B Swatch Internet time<br />

d Day of the month as two digits, including a leading zero if necessary; e.g.,<br />

“01” through “31”<br />

D Name of the day of the week as a three-letter abbreviation; e.g., “Mon”<br />

F Name of the month; e.g., “August”<br />

g Hour in 12-hour format; e.g., “1” through “12”<br />

G Hour in 24-hour format; e.g., “0” through “23”<br />

h Hour in 12-hour format, including a leading zero if necessary; e.g., “01”<br />

through “12”<br />

H Hour in 24-hour format, including a leading zero if necessary; e.g., “00”<br />

through “23”<br />

I Minutes, including a leading zero if necessary; e.g., “00” through “59”<br />

I “1” if Daylight Savings Time; “0” otherwise<br />

j Day of the month; e.g., “1” through “31”<br />

l Name of the day of the week; e.g., “Monday”<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2002 O’Reilly & Associates, Inc. All rights reserved.<br />

date | 391

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!