|
-
Jan 26th, 2003, 09:52 PM
#1
Random Quotes
Hi,
I came across this link: http://www.oxyscripts.com/view_tutorial.php?id=51
for a random quote generator. But I have a couple questions:
Question 1:
Since this script uses an array, doesn't this mean all the elements in the array will eat up memory? So a list of say, 200 quotes using the array method is advisable or inadvisable?
Question 2:
I had another idea to do the same thing. I can create a txt file with all the quotes on separate lines. I can then use
PHP Code:
$fileget = file("quotes.txt");
and then choose an array element from fileget[] at random. So the question here is, if I use the $fileget method, does this too eat up as much memory as the other method?
Question 3:
What is the best method to do this?
Thanks a bunch.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|