search in associative array

Discussion in 'PHP' started by daimous, Jan 23, 2006.

  1. #1
    how will I search in associative array? supposing i have this associative array.
    $words = array('the' => array('huhh','make'),'word'=>array('they','make'));
    
    PHP:
    any help will be greatly appreciated.
     
    daimous, Jan 23, 2006 IP
  2. Bliss

    Bliss Peon

    Messages:
    107
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    foreach($words as $word=>$contained) {
    ...
    }
     
    Bliss, Jan 23, 2006 IP