why isn't this unsetting?

    Date: 07/24/06 (PHP Community)    Keywords: no keywords

    echo "

    ";
    print_r($formdetails['taglist']);
    echo "
    ";

    foreach ($formdetails['taglist'] AS $k => $v)
    {
        if ($v == $tagtodelete)
        {
            echo $v . $tagtodelete;
            unset($formdetails['taglist'][$tagtodelete]);
        }
    }
    echo "

    ";
    print_r($formdetails['taglist']);
    echo "
    ";




    is giving me
    Array
    (
    [0] => admining
    [1] => amazon
    [2] => another tag
    [3] => ebs
    [4] => ex-girlfriend
    [5] => life
    [6] => meme
    [7] => music
    [8] => retest
    [9] => singledom
    [10] => test
    [11] => test again
    [12] => wishlist
    [13] => work
    )

    retestretest

    Array
    (
    [0] => admining
    [1] => amazon
    [2] => another tag
    [3] => ebs
    [4] => ex-girlfriend
    [5] => life
    [6] => meme
    [7] => music
    [8] => retest
    [9] => singledom
    [10] => test
    [11] => test again
    [12] => wishlist
    [13] => work
    )

    Source: http://community.livejournal.com/php/474762.html

« fopen || Mail Function & HTTP Errors »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home