Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to read and write to flat text file with PHP 1

Status
Not open for further replies.

tyhand

Programmer
Joined
Jul 3, 2002
Messages
186
Location
US

Hey all,

I'm a newbie to php. I need to know the basics of
how to read and write to a plain ol' text file using
php.

I'm using sitepoint's "using php & mysql" as a
reference, but need a quick fix as I'm not using
mysql yet - just a plain text file.

Any and all help is greatly appreciated. Thanks. Peace!

T Y H A N D
 
I found the answer an here they are

echo ( "year1".date('Y',(strtotime("1999-05-12")))."<BR>");
or
echo ( "year2".date('Y',(strtotime("12-jun-2004")))."<BR>");

Thanks
 
OOps!
Wrong post about the Year extract of the Date, please disregard it.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top