Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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...
    2. 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...
    3. 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 .......
    4. #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: ...
    5. #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...
  3. #2

    Default Re: php alphabet list

    On Thu, 7 Oct 2004 08:15:13 +1000, Bernie <bernie@znservices.com> wrote:
    > 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
    >
    >
    Hi,
    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>&nbsp;';
    }


    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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139