views:

55

answers:

1

And how does it translate to in C#?

$item holds the results from mysql_fetch_array()

I'm not really familiar with PHP so this is all new to me. Thanks.

+3  A: 

$_SESSION is a superglobal that stores session data in an associative array, see http://php.net/session.

In your example, the value at $_SESSION['sessionName'] is apparently an array itself, which is indexed into with the value of $item['rowName'] which smells like a string.

To simplify the expression, you could define these variables:

$sessionName = $_SESSION['sessionName'];
$rowName = $item['rowName'];

And then we could say that your example code is equivalent to

$sessionName[$rowName]
yjerem
Ah thanks, but that doesn't really answer my question. Anyway, seems like I need to use hashtables in .Net since things seem to work a bit different. Thanks for the time. :)
AKofC
Yes, hashtable sounds about right. All PHP arrays are "associative arrays", which I believe is a synonym for "hash tables". They have keys, which can be integers or strings, and map each key to a value. You may want to read http://php.net/array
yjerem