Q:

How Can I do c# dictionary for php but. Loop class

I want to convert this C# code to PHP code.
class Members
{
    public int ID { get; set; }
    public string Name { get; set; }
    public string Surname { get; set; }
}

class Process
{

    Dictionary<string, Members> MemberList = new Dictionary<string, Members>();
    public Process()
    {

        //GetMembersMethod();
        //Fill MemberList
        //example
        //MemberList.Add(userid,new Members{id=@id,name=@name,surname=@surname});
    }

    void WriteMembers() {
        foreach (string item in MemberList.Keys)
        {
            Console.WriteLine(MemberList[item].ID);
            Console.WriteLine(MemberList[item].Name);
            Console.WriteLine(MemberList[item].Surname);
        }
    }
}

How I can code this c# example in PHP? How can I code the loop to dictionary using array classes with PHP?
Edit..
I coded 2 days ago this code;
I want to like to this..
<?php
class CKN
    {
        public $Name= 'ozan';
        public $Surname= 'ckn';
        public $ID = '12';
    }
    $class = new CKN();
    for($i=0; $i<10; $i++){
        $class_temp= new CKN();
        $class_temp->Name="ozan".$i;
        $class_temp->Surname="CKN".$i;  
        $class_temp->ID="CKN".$i;
        $arr[$i]=(object)$class_temp;
    }
    foreach($arr as $key => $value) {
        $temp=new (CKN)$value;
        foreach($temp as $k=>$v){
            print "$k=> $v <br>";
        }
    }
    ?>

A:

You could try using http://jsc.sourceforge.net/, which assists with .net to javascript, actionscript or php. 
If you want to do it yourself:

Classes are declared in pretty much the same way
Dictionaries are loosely reducible to hashmaps, which can be substituted by php "arrays"
Replace the console with your desired output stream.
Remove typed declarations. All variables start with $.

I might have missed something, but that should get you started. Good luck.
EDIT: Here is code that I think does what you need. You can test it here:
<?php
class CKN
{
    public $Name= 'ozan';
    public $Surname= 'ckn';
    public $ID = '12';
}
for($i=0; $i<10; $i++){
    $class_temp= new CKN();
    $class_temp->Name="ozan".$i;
    $class_temp->Surname="CKN".$i;  
    $class_temp->ID="CKN".$i;
    $arr[$i]=$class_temp;
}
foreach($arr as $key => $value) {
    foreach($value as $k=>$v){
        print "$k=> $v <br>";
    }
}
?>

