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

  1. #1

    Default Hash

    Hi,

    How set up functions hash in php4.3.2

    thanks

    __________________________________________________ _______________
    Charla con tus amigos en línea mediante MSN Messenger:
    [url]http://messenger.yupimsn.com/[/url]

    Aect Listas Guest

  2. Similar Questions and Discussions

    1. Hash in AS 2.0
      So I was about to write a hash algorythm for flash and it appears brandon hall beat me by 2 years. Since there isn't anything here, in the flash...
    2. hash of hash of array slices
      This works Foreach ( @{$hash{$key1}{$key2}} ) This does note Foreach ( @{($hash{$key1}{$key2})} ) This gives me this error .... Can't...
    3. Sort a hash based on values in the hash stored as arrays of hashes
      Hmm. I'm not quite sure if I got the subject right, but I'll try to explain. :-) I've got a hash of elements stored like this: $VAR1 = {...
    4. Hash of Hash
      Greetings, I am attempting to make a hash of hashes or something equivalent but can't seem to get it working properly. Here is what I have so...
    5. Another reference question (hash of hash references)
      beginners, I am trying to build a hash of hash references. My problem is that I need to be able to add a key/value pair to the internal hashes......
  3. #2

    Default Re: [PHP] Hash

    do you have something agains php.net/md5? php.net/crc32? php.net/sha1? They're
    all included in 4.3



    On Wednesday 30 July 2003 07:40 pm, AECT Listas wrote:
    > Hi,
    >
    > How set up functions hash in php4.3.2
    >
    > thanks
    >
    > __________________________________________________ _______________
    > Charla con tus amigos en línea mediante MSN Messenger:
    > [url]http://messenger.yupimsn.com/[/url]
    Evan Nemerson Guest

  4. #3

    Default Re: hash


    "Garry Short" <g4rry_sh0rt@zw4llet.com> wrote...
    > [email]sonet.all@msa.hinet.net[/email] wrote:
    >
    > > how to do $ADHash{@userArray}=1;
    > >
    > >
    > > Known
    > > @usrArray = [a,b,c]
    > >
    > > Let:
    > > $ADHach{'a'}=1
    > > $ADHach{'b'}=1
    > > $ADHach{'c'}=1
    > >
    > >
    > > please mail to : [email]sonet.all@msa.hinet.net[/email]
    >
    > How about:
    >
    > foreach my $elem (@usrArray) { $ADHash{$elem} = 1 }
    >
    > or, even nicer (didn't know this was possible; suddenly had a flash of
    > inspiration, tried it, and ... )
    >
    > $ADHash{$_} = 1 foreach @usrArray;
    or if you want to avoid an extra line for declaring the hash under 'use strict':

    my %ADHash = map { $_ => 1 } @usrArray;

    Thomas
    Thomas Kratz Guest

  5. #4

    Default Re: hash

    [CCed to poster]

    Also sprach <sonet.all@msa.hinet.net>:
    > how to do $ADHash{@userArray}=1;
    >
    >
    > Known
    > @usrArray = [a,b,c]
    >
    > Let:
    > $ADHach{'a'}=1
    > $ADHach{'b'}=1
    > $ADHach{'c'}=1
    By using a hash-slice:

    @ADHash{ @userArray } = (1) x @userArray;

    Slices are described in perldata.pod.
    > please mail to : [email]sonet.all@msa.hinet.net[/email]
    You may ask for a CC but asking for a mail reply is rude. A newsgroup
    also acts as archive for other people to look things up. If all replies
    were by mail, a newsgroup would only contain the questions but no
    answers.

    Tassilo
    --
    $_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
    pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus}) !JAPH!qq(rehtona{tsuJbus#;
    $_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexi ixesixeseg;y~\n~~dddd;eval
    Tassilo v. Parseval Guest

  6. #5

    Default Re: hash

    [email]sonet.all@msa.hinet.net[/email] wrote:
    > how to do $ADHash{@userArray}=1;
    >
    >
    > Known
    > @usrArray = [a,b,c]
    >
    > Let:
    > $ADHach{'a'}=1
    > $ADHach{'b'}=1
    > $ADHach{'c'}=1
    >
    >
    > please mail to : [email]sonet.all@msa.hinet.net[/email]
    How about:

    foreach my $elem (@usrArray) { $ADHash{$elem} = 1 }

    or, even nicer (didn't know this was possible; suddenly had a flash of
    inspiration, tried it, and ... )

    $ADHash{$_} = 1 foreach @usrArray;

    I like that one :-)

    Garry


    Garry Short Guest

  7. #6

    Default Re: hash

    sorry !! my english is so poor! our first language is not english
    in other words , i cant distinguish what different from mailto and cc .
    sorry again!!
    thanks for your reply


    "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de> ¦b¶l¥ó
    news:bgvsmt$1ot$1@nets3.rz.RWTH-Aachen.DE ¤¤¼¶¼g...
    > [CCed to poster]
    >
    > Also sprach <sonet.all@msa.hinet.net>:
    >
    > > how to do $ADHash{@userArray}=1;
    > >
    > >
    > > Known
    > > @usrArray = [a,b,c]
    > >
    > > Let:
    > > $ADHach{'a'}=1
    > > $ADHach{'b'}=1
    > > $ADHach{'c'}=1
    >
    > By using a hash-slice:
    >
    > @ADHash{ @userArray } = (1) x @userArray;
    >
    > Slices are described in perldata.pod.
    >
    > > please mail to : [email]sonet.all@msa.hinet.net[/email]
    >
    > You may ask for a CC but asking for a mail reply is rude. A newsgroup
    > also acts as archive for other people to look things up. If all replies
    > were by mail, a newsgroup would only contain the questions but no
    > answers.
    >
    > Tassilo
    > --
    >
    $_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
    >
    pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus}) !JAPH!qq(rehtona{tsuJbus#;
    >
    $_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexi ixesixeseg;y~\n~~dddd;eval


    Guest

  8. #7

    Default Hash

    How do I make the current letters appear in this version of hangman?


    $current{word} = $cat

    When the user enters c. I need it show c_ _.

    sub processguess{


    #hash of letters guessed
    $current{letters} .= param('guess');
    @guessed_letters = split('', $current{letters});
    $current{letters} = join('', @guessed_letters);
    return $current{'letters'};


    my @word = split / /, $current{word};
    $current{'revealed'} = join '',map {$current{letters}{$_} ? $_ : '_' }
    $current{word} =~ /(.)/g;
    return $current{'revealed'};
    }

    weberw@adelphia.net Guest

  9. #8

    Default Re: Hash

    [email]weberw@adelphia.net[/email] schreef:
    > How do I make the current letters appear in this version of hangman?
    Certainly not by multi-posting.

    --
    Affijn, Ruud

    "Gewoon is een tijger."


    Dr.Ruud Guest

  10. #9

    Default Re: Hash

    "weberw@adelphia.net" <weberw@adelphia.net> writes:
    > How do I make the current letters appear in this version of hangman?
    You also posted this separately in c.l.p.misc. Please don't do that. This
    isn't a modules question anyway.

    sherm--

    --
    Web Hosting by West Virginians, for West Virginians: [url]http://wv-www.net[/url]
    Cocoa programming in Perl: [url]http://camelbones.sourceforge.net[/url]
    Sherm Pendley Guest

Posting Permissions

  • You may not post new threads
  • You may not 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