How to access stdClass element in php ?
<p>I query db and I have an array. How can I access stdClass object ? And I want also serializedName property like in java serializedName. So, The fields which query from db must be assign with my custom object class fields.How can I use this?</p>

<pre><code> Array
    (
        [0] =&gt; stdClass Object
            (
                [receipt_id] =&gt; 1
                [defect] =&gt; asd
                [tec_report] =&gt; sad
                [doc_number] =&gt; asd
                [warrant] =&gt; 12
                [warrant_start] =&gt; 2016-01-05
                [warrant_end] =&gt; 2016-01-29
                [repair_time] =&gt; 3
                [receipt_date] =&gt; 2016-01-05
                [delivery_date] =&gt; 
                [service_type_id] =&gt; 0
                [service_price] =&gt; 0
                [part_price] =&gt; 0
                [pay_type] =&gt; 
                [labour] =&gt; 0
                [summary] =&gt; 0
                [technician_id] =&gt; 
                [customer_id] =&gt; 0
                [device_id] =&gt; 0
                [seri_number] =&gt; 
            )

        [1] =&gt; stdClass Object
            (
                [receipt_id] =&gt; 2
                [defect] =&gt; asdsad
                [tec_report] =&gt; asds
                [doc_number] =&gt; 
                [warrant] =&gt; 
                [warrant_start] =&gt; 
                [warrant_end] =&gt; 
                [repair_time] =&gt; 
                [receipt_date] =&gt; 2016-01-05
                [delivery_date] =&gt; 
                [service_type_id] =&gt; 1
                [service_price] =&gt; 12
                [part_price] =&gt; 12
                [pay_type] =&gt; 
                [labour] =&gt; 12
                [summary] =&gt; 12
                [technician_id] =&gt; 
                [customer_id] =&gt; 21
                [device_id] =&gt; 12
                [seri_number] =&gt; 
            )

    )
</code></pre>