I have many files in a folder and wish to only list one of each date
these are the file names.
date format (dd/mm/yyy)
abc - 12-01-2009 - something.pdf
abc - 12-01-2009 - something else.pdf
abc - 12-01-2009 - another title.pdf
abc - 24-05-2009 - some other text
abc - 24-05-2009 - yet more files
abc - 24-05-2009 - yet another title.pdf
if i had these files then i would like the results to be
12-01-2009
24-05-2009
in an array
at present i have this script..
Code: $files = glob('agendas/*.pdf');
$sortfile = array();
foreach($files as $file){
//Extract date
if (preg_match('/(d+)-(d+)-(d+)[^.]*?.pdf/', $file, $reg)) {
//if (preg_match('/(d+)-(d+)-(d+)-Agenda Item (d+)[^.]*?.pdf/', $file, $reg)) {
//add date to array (file as key)
$sortfile[$file] = mktime(0,0,0,$reg[2],$reg[1],$reg[3]);
}
}
this only gets the files but i would like to have these files sorted and have only one of each date
how would this be done.
query based on 2 conditions
I want to select if the doc_type is either s OR f but this doesn't work:Code: [Select]$query2 = "SELECT * FROM members WHERE doc_type='s' && doc_type= 'f' ORDER BY
SAP FICO learning materials
Hi all,
Removing Title From database problem
Hi again ! i am having an issue with updating database. When i update any price of a title it remove the title from database please can somebody help me what i am missing in my code. here it is:Code:
How to extract/download content from HTTPS page?
Hello to all the Members of this forum, Im Shoiab, A novice programmer in php.. for my first job I have been recently assigned a project, in which I have got to extract/download the contents of the
Really need helps regarding Pagination with Sort
I need someone helps regarding pagination problem...i actually want to make my page limited to let say 50 so it will look like this page1=0-50page2=51-100Then i want to sort let say based on the name
Printing a webpage
I use this to print the webpage:
my code does not work.
I have a code problem.Quote"<a href=index.php?gogo=ureticidetay&'?l={$letter}'>{$ letter}</a>" this is not working. but need link like this
Simple code help with redirects
I am trying to figure out a redirect script that detects if the browser is IE 7 and if it does, redirect the user to another page. Is this even possible?
Character increment
Hi,I am facing a scenario like above,but in my case i want to show up like Col A,Col B etc....The container where i am displaying this is being dynamically generated using jquery.Any help?
Attempt to assign property of non-object in...
I'm having issues with the following function in PHP 5... function getTreeWithChildren() { $category_id = $this->fields['id']; $parent_id =