[plug] PHP Arrays

Leon Brooks leon at brooks.smileys.net
Mon Sep 11 08:20:29 WST 2000


skribe wrote:
> I would have thought that $array_name["element_name"] would do it but it's
> not working for me.  I'm trying to extract out the value from the element
> name.  Any suggestions?

If the element has been added like this:

    array["element"] = value;

...then this should also work:

    value == $array["element"];

As a debugging test, try this:

    while (list (key, value) = each ($array)) {
	echo "array[" . $key . "] = '" . $value . "'<br>\n";
    }

After that, I commend to you the annotated manual at http://www.php.net/manual/

-- 
Traverse: To ski across a slope at an angle; one of two quick and
          simple methods of reducing speed.
Tree:     The other method. -- from "The Skier's Dictionary"



More information about the plug mailing list