Ask a Question related to PHP Development, Design and Development.
-
Bernie #1
php alphabet list
Hi,
I have a list of movies displayed with the letters a-z on top of page. I
would like to press a letter and get the corresponding list of movies
starting with the chosen letter. How do I go about doing this. Any help
would be appreciated. Using PHP and Mysql with Dreamweaver MX . Thanks
Bernie
Bernie Guest
-
Multi-line TextBox - Paste text with numbered list, bullet list, tab character
Hi All, I need a server control that's exactly like a multi-line TextBox, but also allow users to paste text with numbered list, bullet list, and... -
alphabet listing of query
I would like to run one query that would return the records in a alphabetized asc listing but I would like it grouped like this: A at attach... -
Alphabet Paging Menu - ping Aaron :0)
Hi Guys Wonder if anybody has found a way round this one. First show a menu linking system as follows: 0 - 9 A B C D E F G H I J ....... -
#25829 [Opn->Bgs]: For loops against the alphabet don't function properly
ID: 25829 Updated by: elmicha@php.net Reported By: tim at timcrider dot com -Status: Open +Status: ... -
#25829 [NEW]: For loops against the alphabet don't function properly
From: tim at timcrider dot com Operating system: Red Hat 9.0 PHP version: 5CVS-2003-10-10 (dev) PHP Bug Type: Scripting... -
Tobias Schlemmer #2
Re: php alphabet list
On Thu, 7 Oct 2004 08:15:13 +1000, Bernie <bernie@znservices.com> wrote:
Hi,> Hi,
> I have a list of movies displayed with the letters a-z on top of page. I
> would like to press a letter and get the corresponding list of movies
> starting with the chosen letter. How do I go about doing this. Any help
> would be appreciated. Using PHP and Mysql with Dreamweaver MX . Thanks
> Bernie
>
>
So you can use 0-9, A, B, C, ... Z.
To create a list form A to Z use the php range function and merge them
together with 0-9:
$arrList = array_merge(array('0-9'), range('A','Z'));
foreach ($arrList as $value) {
echo '<a href="http://example.com/alphabet.php?letter=' . $value . '">' .
$value . '</a> ';
}
Now, you can call your webpage with the corresponding link e.g
[url]http://example.com/alphabet.php?letter=A[/url]
And your MySQL goes like this:
SELECT *
FROM movies
WHERE movie_name REGEXP '^[" . $_GET['letter'] . "]';
If no letter is selected, you will get the whole list.
But i dont known how it looks in Dreamwearver.
Tobias Schlemmer Guest



Reply With Quote

