Forum Moderators: open

Message Too Old, No Replies

associative array

         

NomikOS

6:36 am on Feb 28, 2009 (gmt 0)

10+ Year Member



Hi, I came from PHP world.

I need parse an associative array (not numeric) in ASP. In PHP is:

foreach ($array as $var => $val)
{
// $var is the index (is not numeric)
// ex: $var = 'name'; $val = 'John Doe'
}

I know that is something like this:

For i=0 to UBound(array)
response.write array(i)
Next

But this is not for associative array, right?

Please can you guide me!

Thanks.-

[edited by: NomikOS at 6:38 am (utc) on Feb. 28, 2009]

darrenG

7:36 pm on Mar 1, 2009 (gmt 0)

10+ Year Member



The closest thing to an assoc array in VB is a hashtable.

mattur

4:45 pm on Mar 10, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Or in ASP use the DictionaryObject [w3schools.com]