Hi Guys,
I have a page that sorts the contents (PDFs) of a directory and displays them on the webpage chronologically from the oldest (at top) to the newest (at bottom).
I'd like to reverse this display order and have the latest files display at the top with oldest at the bottom. The code is seen below:
Thanks in advance!!!
<?php
$dir = opendir('../../files/main/group/info');
$i = 0;
// begin subdirectory processing
$subdir = "../../files/main/group/info"."/";
$cwd = opendir($subdir);
echo '<ul style="list-style: none;"><strong>';
while ($file = readdir($cwd)) {
if (($file != ".") && ($file != "..") && ($file != "README.txt")) {
$link = rawurlencode($file);
$tmp = basename($file, ".pdf");
$filename = date('F d, Y',strtotime($tmp));
echo '<li><img src="../../images/icons/pdf.gif" alt="PDF Document" /> <a href="' . $subdir, $link . '" target="_blank">' . $filename . '</a>';
}
}
echo "</strong></ul>";
?>
Set Categories
I am creating a submission form for somebody to come in and submit products. These products are separated by brand. How can I get them to display according to the brand?Here is the form code:Code:
php ajax - two drop down list with a submit button
i have created a form with 2 drop-down list and a submit button. I would like to know how to pass the selected values from the two drop down list to external javascript file and only will pass it
Simple PHP/Java Help..
Hi,I'm trying to build a little program to do with calculating postage. Unfortunately i haven't got a very good idea of how to use PHP, Java, or any other languages - apart from CSS and HTML -_-. If
Change snippet to use CURDATE
I am using time() in the snippet below, I would like to use CURDATE() and have the database setup for date. My problem is, I am not sure how to change the PHP coding, I keep getting errors just adding
To change the name of label on SAP screen XK02.
Hi All,
ctype() validation - allowing illegal characters
Hello,I use ctype() to filter and validate a user form. However, I am trying to allow certain characters.Example:Code: //Validate Copay $allow = array('$', '.'); if (!empty($copay)
Loop column after 2 results
Hello All.Here is what I have:Client ID Company name Client ID Company nameI then need a script to echo 2 results per row then start a new row.I've tried many
unexpected T_SL without a shift left token
Nothing too see here, I'm an idiot and resolved the problem.
Alterar a hora do servidor
Se alguém souber, ajude-me a adicionar 6 horas, obrigado<tr> <th>{ov_server_time}</th> <th
Printing issues with xMII 11.5
For some reason, we have one report (and only one) that is giving us fits when trying to print. The user has JRE 1.4.2_13 installed. When he clicks the print button, IE freezes, and nothing prints.