I am writing a simple script to send out emails every day. What it will do is pull an email from a table that I will make, formatted something like this: userid(numerical) email HTML: Easy enough right? Not quite. I want to add another table that is called "sites" lets say, and in it is just one column of urls, one column called sent (yes or no, default is no, you get the idea) and one column of categories. I will add a new site via a form or manually, doesn't really matter. What I need to know how to do is some sort of cron or scheduling feature, and how to echo multiple sites in an email. What I would like to do is send out an email say twice a day, with X links in it. The cron job would send the emails, and mark the sites sent when they were used, by pulling the sites/categories from the table. I know how to do the if for the sent part, but I'm not quite sure how to loop it so that it pulls multiple rows (a number that I specify). Does anyone know of a script that does this? If not, can someone help me figure out the looping code? This may look like a weird request, but I know it isn't that hard. I don't have that much php under my belt, and I am missing my new php book :/