1. Could be some case sensitive stuff, try:
PHP Code:
$pattern="\.(jpg|jpeg|png|gif|bmp|JPG|JPEG|PNG|GIF|BMP)$";
I also reccomend looking into using preg_match, instead of eregi as it's newer and more efficient.
2. If your using MySQL, put the following:
'LIMIT 0 , 3'
at the end of the query you wish to limit.
The above would return everything between the first and third lines that met the query.
Change the 0 and 3 as necessary.
If not you could put something like
PHP Code:
$limit[0] = "0"; $limit[1] = "3";
$limit[2] = "0"; // counter
// Stuff being returned, { $limit[2] = $limit[2] + 1; if($limit[2] >= $limit[0] or $limit[2] <= $limit[1]){ // show it } else { // do not show it. } // }
__________________
My Blog/Site: Please login or register to view this content. Registration is FREE
Last edited by rogem002; 08-15-2007 at 03:12 PM..
|