Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Pobieranie tablicy $tblica[0][nazwa] $tablica[1][nazwa]
pawel06281990
post
Post #1





Grupa: Zarejestrowani
Postów: 298
Pomógł: 0
Dołączył: 10.01.2014

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


Witam,

Mam problem z pobraniem tablic format tablic jest taki

  1. Array ( [0] => Array ( [id] => 615c9da1938709beb0cc3126 [first_name] => Paweł [last_name] => D [phone_number] => zastrzezony numer [email] => adres e-mail klienta [gender] => male [city] => [country] => Poland [date_created] => 2021-10-05T20:46:57+02:00 [date_updated] => 2021-10-05T20:46:57+02:00 [description] => [groups] => Array ( [0] => Array ( [id] => 61583ac8938709beb0dd8c18 [name] => default [date_created] => 2021-10-02T12:56:08+02:00 [date_updated] => 2021-10-02T12:56:08+02:00 [description] => [created_by] => paweld1990@gmail.com [idx] => [contact_expire_after] => [contacts_count] => ) ) ) [1] => Array ( [id] => 615cb107938709beb0cc3213 [first_name] => Paweł [last_name] => D [phone_number] => top sekret [email] => adres e-mail klienta [gender] => male [city] => [country] => Poland [date_created] => 2021-10-05T22:09:43+02:00 [date_updated] => 2021-10-05T22:09:43+02:00 [description] => [groups] => Array ( [0] => Array ( [id] => 61583ac8938709beb0dd8c18 [name] => default [date_created] => 2021-10-02T12:56:08+02:00 [date_updated] => 2021-10-02T12:56:08+02:00 [description] => [created_by] => paweld1990@gmail.com [idx] => [contact_expire_after] => [contacts_count] => ) ) ) ) 2Array ( [0] => Array ( [id] => 615c9da1938709beb0cc3126 [first_name] => Paweł [last_name] => Danielewski [phone_number] => 48693877150 [email] => danielpaw1@wp.pl [gender] => male [city] => [country] => Poland [date_created] => 2021-10-05T20:46:57+02:00 [date_updated] => 2021-10-05T20:46:57+02:00 [description] => [groups] => Array ( [0] => Array ( [id] => 61583ac8938709beb0dd8c18 [name] => default [date_created] => 2021-10-02T12:56:08+02:00 [date_updated] => 2021-10-02T12:56:08+02:00 [description] => [created_by] => paweld1990@gmail.com [idx] => [contact_expire_after] => [contacts_count] => ) ) ) [1] => Array ( [id] => 615cb107938709beb0cc3213 [first_name] => Paweł [last_name] => Danielewski [phone_number] => 48547125654 [email] => danielpaw1@o2.pl [gender] => male [city] => [country] => Poland [date_created] => 2021-10-05T22:09:43+02:00 [date_updated] => 2021-10-05T22:09:43+02:00 [description] => [groups] => Array ( [0] => Array ( [id] => 61583ac8938709beb0dd8c18 [name] => default [date_created] => 2021-10-02T12:56:08+02:00 [date_updated] => 2021-10-02T12:56:08+02:00 [description] => [created_by] => adres email twórcy [idx] => [contact_expire_after] => [contacts_count] => ) ) ) )


I kiedy robię to tak

  1. for( $x = 0; $x < count($lista_pol); $x++ )
  2. foreach ( $lista_pol as $list ) {
  3.  
  4. print_r($list);
  5. echo"<tr>";
  6. echo"<td>".$list[$x]['first_name']." ".$list[$x]['last_name']."</td>";
  7. echo"<td>".$list[$x]['phone_number']."</td>";
  8. echo"<td>".$list[$x]['email']."</td>";
  9. echo"<td><a href='".POWIADOMIENIA_SMS_URL."?page=powiadomienia_sms_edit&id=".$list[$x]['id']."'><img src='".POWIADOMIENIA_SMS_PATH."/assets/images/edit.png' title='".__('Edytuj','powiadomienia_sms')."'> </a>|";
  10. echo"<a href='".POWIADOMIENIA_SMS_URL."?page=powiadomienia_sms_lista&action=kasuj&id=".$list[$x]['id']."' onclick=\"return confirm('".__('Czy chcesz usunąć kontak z bazy', 'powiadomienia_sms')."');\"><img src='".POWIADOMIENIA_SMS_PATH."/assets/images/delete.png' title='".__('Skasuj','powiadomienia_sms')."'> </a>";
  11. echo"</td>");
  12.  
  13. }



To mam 2 tabele puste i 2 tabele z danymi z tablic a ja chce, aby pobrać tablice zawartością klientów z bazy smsapi nie wiem w czym robię błąd.

Ten post edytował pawel06281990 26.01.2022, 10:31:08
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: 9.08.2026 - 02:15