glob() regex

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
psurrena
Forum Contributor
Posts: 355
Joined: Thu Nov 10, 2005 12:31 pm
Location: Broolyn, NY

glob() regex

Post by psurrena »

Question is, the code below grabs all images that end with "_t.jpg", what would be the expression to exclude all images containing "_t"

So one array would contain (1_t.jpg, 2_t.jpg) and a different array would contain (1.jpg, 2.jpg)

Thanks!

Code: Select all

 
$thumbails = glob("images/projects/$row->directory/*_t.jpg")
 
Post Reply