![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 118 Pomógł: 0 Dołączył: 14.02.2004 Skąd: Warszawa Ostrzeżenie: (10%) ![]() ![]() |
Witam. Chodzi mi onatępującą rzecz:
Mam dwie tablice: [php:1:13d1f54240]<?php $tbl_1[] = 1; $tbl_1[] = 2; $tbl_1[] = 3; $tbl_1[] = 4; $tbl_1[] = 5; ?>[/php:1:13d1f54240] i [php:1:13d1f54240]<?php $tbl_2[] = 1; $tbl_2[] = 4; $tbl_2[] = 6; $tbl_2[] = 23; $tbl_2[] = 32; $tbl_2[] = 10; $tbl_2[] = 8; ?>[/php:1:13d1f54240] Chcę porównać ze sobą. Aby z tablicy $tbl_2 zostały usunięte wszystkie liczby, które są w $tbl_1 Jak to zrobić? Prosiłbym jeśli to możliwe o gotowy przykład skryptu. |
|
|
![]() |
![]()
Post
#2
|
|
Administrator planeta/IRC Grupa: Przyjaciele php.pl Postów: 385 Pomógł: 0 Dołączył: 19.04.2003 Skąd: Zabrze Ostrzeżenie: (0%) ![]() ![]() |
Ja bym jednak skorzystał z [manual:992362f0c9]array_diff()[/manual:992362f0c9] (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
|
|
|
![]() ![]() |
![]() |
Aktualny czas: 14.10.2025 - 14:49 |