1) I have a text file (images.txt) with
Code: Select all
<img src="e;a.gif"e;>
<img src="e;b.gif"e;>
<img src="e;c.gif"e;>
<img src="e;d.gif"e;>
<img src="e;e.gif"e;>
etc.The method I would normally use to do this would be to put each of the rows into an array and give each row a random number. I would then take the n biggest random numbers. My problem is that I don't know how to do this in php.
I also experience a problem with normal random row scripts which sometimes throw up nothing - counting the last row in the file as a line to pick from I suspect, so I would like this issue to be eliminated by only allowing rows containing text to be part of the array.
Does anyone know of a link to such a script?
Regards.