Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Połączenie wartości w tablicy
winiar789
post
Post #1





Grupa: Zarejestrowani
Postów: 130
Pomógł: 0
Dołączył: 15.11.2011

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


Mam coś takiego :

Array
(
[0] => Array
(
[data-position] => 1
[data-shopurl] =>nazwaa
[data-offer-price] =>
)

[1] => Array
(
[data-position] =>
[data-shopurl] =>
[data-offer-price] => 458.00
)

[2] => Array
(
[data-position] => 2
[data-shopurl] => nazwaa
[data-offer-price] =>
)

[3] => Array
(
[data-position] =>
[data-shopurl] =>
[data-offer-price] => 469.27
)
)

a chciałbym uzyskać:


Array
(
[0] => Array
(
[data-position] => 1
[data-shopurl] =>nazwaa
[data-offer-price] => 458.00
)

[1] => Array
(
[data-position] => 2
[data-shopurl] => nazwaa
[data-offer-price] => 469.27
)
)

Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
nospor
post
Post #2





Grupa: Moderatorzy
Postów: 36 559
Pomógł: 6315
Dołączył: 27.12.2004




No jesli tab ma byc oddzielna dla kazdej iteracji, to ja poprostu zeruj

$tab = array();
foreach($html->find('.clasa_wartosci') as $element) {

i po sprawie
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: 3.10.2025 - 10:19