Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Połączenie ciągów z tablicy
winiar789
post 31.07.2017, 22:22:34
Post #1





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

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


Mam coś takiego:

Array
(
[0] => Array
(
[link] => http://domena1.pl/abc-p523
)

[1] => Array
(
[link] => http://domena2.pl/abc-p523/4197
)

[2] => Array
(
[link] => http://domena1.pl/abc-p2323
)

[3] => Array
(
[link] => http://domena2.pl/abc-p523/2323
)

[4] => Array
(
[link] => http://domena1.pl/abc-p44444
)

[5] => Array
(
[link] => http://domena2.pl/abc-p523/44444
)


)



a chciałbym uzyskać:


Array
(
[0] => Array
(
[link_1] => http://domena1.pl/abc-p523
[link_2] => http://domena2.pl/abc-p523/4197
)

[1] => Array
(
[link_1] => http://domena1.pl/abc-p2323
[link_2] => http://domena2.pl/abc-p523/2323
)

[2] => Array
(
[link_1] => http://domena1.pl/abc-p44444
[link_2] => http://domena2.pl/abc-p523/44444
)

)



Go to the top of the page
+Quote Post
viking
post 1.08.2017, 06:08:41
Post #2





Grupa: Zarejestrowani
Postów: 6 378
Pomógł: 1116
Dołączył: 30.08.2006

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


http://php.net/manual/en/function.array-chunk.php


--------------------
Go to the top of the page
+Quote Post
winiar789
post 1.08.2017, 07:35:10
Post #3





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

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


Piątka dla Ciebie ! to się ceni ... Dzięki smile.gif
Go to the top of the page
+Quote Post

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

 



RSS Wersja Lo-Fi Aktualny czas: 18.07.2025 - 02:50