Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Operacje na obiektach
miedzna
post
Post #1





Grupa: Zarejestrowani
Postów: 401
Pomógł: 1
Dołączył: 10.03.2004
Skąd: Warszawa

Ostrzeżenie: (0%)
-----


Hej, mam dane objektowe jak poniżej. Jak zmienić klucze
[0] => stdClass Object
[1] => stdClass Object
[2] => stdClass Object
[3] => stdClass Object
[4] => stdClass Object

na odpowiedniki z pozbioru, czyli
[id] => 3
[id] => 2
[id] => 2
[id] => 1
[id] => 1

czyli żeby było tak
[3] => stdClass Object
[2] => stdClass Object
[2] => stdClass Object
[1] => stdClass Object
[1] => stdClass Object

  1. (
  2. [0] => stdClass Object
  3. (
  4. [id] => 3
  5. [clientID] => 123
  6. )
  7.  
  8. [1] => stdClass Object
  9. (
  10. [id] => 2
  11. [clientID] => 456
  12. )
  13.  
  14. [2] => stdClass Object
  15. (
  16. [id] => 2
  17. [clientID] => 789
  18. )
  19.  
  20. [3] => stdClass Object
  21. (
  22. [id] => 1
  23. [clientID] => 1011
  24. )
  25.  
  26. [4] => stdClass Object
  27. (
  28. [id] => 1
  29. [clientID] => 1234
  30. )
  31. )
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 25.12.2025 - 18:51