stdClass Objec."/> stdClass Objec."/> stdClass Objec"/>
خرید بک لینک

Vote count: 0

Using this

    var data=$("#form").serializeArray();

output following array using

print_r($data);

in php results to

$data=Array(
[0] => stdClass Object
    (
        [name] => location
        [value] =>lko 
    )

[1] => stdClass Object
    (
        [name] => street_number
        [value] => 425
    )
    )

into the following array

Array(
[location]=>lko
[street_number]=>425)

So far ,I have tried the following

 foreach ($data as $key) {

    echo $POST[$key['name']]=$key['value'];
}

result into following error

Fatal error: Caot use object of type stdClass as array in on line 1237

asked 10 secs ago

- - , .
.

برچسب: نویسنده: استخدام کار تاريخ: پنجشنبه 24 تير 1395 ساعت: 1:34

صفحه بندی