Re: Not too simple, i hope

From: Date: Mon, 13 Aug 2001 02:55:56 +0000
Subject: Re: Not too simple, i hope
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-62325@lists.php.net to get a copy of this message
what are strings though? -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man! ICQ: 115852509 MSN: dbzno1fan@hotmail.com AIM: legokiller666 ----- Original Message ----- From: "Matthew Loff" <matt@willetts.com> To: <php-general@lists.php.net> Sent: Sunday, August 12, 2001 11:22 AM Subject: RE: [PHP] Not too simple, i hope > > http://www.php.net/manual/en/function.fopen.php > http://www.php.net/manual/en/function.fputs.php > http://www.php.net/manual/en/function.fclose.php > > > -----Original Message----- > From: Kyle Smith [mailto:dbzno1fan@hotmail.com] > Sent: Sunday, August 12, 2001 10:16 PM > To: php-general@lists.php.net > Subject: [PHP] Not too simple, i hope > > > ok ive managed to get a random line script to work now, (please dont > hurt me) im asking for a little help! > > This is the script im using > > <?php > randomline("poop.txt"); > function randomline($filename) { > $file = file($filename); > srand((double)microtime()*1000000); > while ($randomquote == "") { > $randomquote = ereg_replace("\n","",$file[rand(0,count($file))]); > } > echo $randomquote; > } > ?> > > And poop.txt looks like > > Random quote "umm, stuff!" > Random quote "smelly pants" > > can someone please show me how to make a form which can write to this > text file.... please! > > > -lk6- > http://www.StupeedStudios.f2s.com > Home of the burning lego man! > > ICQ: 115852509 > MSN: dbzno1fan@hotmail.com > AIM: legokiller666 > > > > > -- > 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 (#62325) next »