-4

Simply , how to remove object from this array . How to convert into array.......

array(2) {
  [0]=>
  object(stdClass)#44 (8) {
    ["invoice"]=>
    string(2) "32"
    ["date"]=>
    string(19) "2016-03-04 03:40:53"
    ["type_ext"]=>
    string(6) "SUBSCR"
    ["type_not"]=>
    int(4)
  }
  [1]=>
  object(stdClass)#42 (8) {
    ["id_invoice"]=>
    string(2) "32"
    ["date"]=>
    string(19) "2016-03-04 03:40:53"
    ["type_ext"]=>
    string(6) "SUBSCR"
    ["type_not"]=>
    int(4)
  }
}

explain it simply...

Muhammad Fahad
  • 1,352
  • 15
  • 15
  • 2
    http://stackoverflow.com/questions/4345554/convert-php-object-to-associative-array?rq=1 - Did you even try to search? - http://stackoverflow.com/questions/2476876/how-do-i-convert-an-object-to-an-array from just copying your title and googling it. – Epodax Mar 04 '16 at 09:55
  • there are lot of question asked u search before asking a question – Rahul Singh Mar 04 '16 at 10:10
  • @Muhammad Please read how to ask http://stackoverflow.com/help/on-topic – Peter Wilson Mar 04 '16 at 10:24
  • Possible duplicate of [Delete an element from an array](http://stackoverflow.com/questions/369602/delete-an-element-from-an-array) – jhoepken Mar 04 '16 at 10:26

1 Answers1

1

This question is already asked multiple times. Anyway, the simplest solution is to use built-in json functions

json_decode(json_encode($object), true);

How do I convert an object to an array?

Convert PHP object to associative array

Community
  • 1
  • 1
Adersh
  • 598
  • 1
  • 9
  • 22