Ich habe ein Array, drucke ich es nur als print_r ($ data), die wie- siehtSpeichern von Array-Werte in zwei Datenbanktabellen
Array
(
[0] => Array
(
[0] => Title
[1] => Featured Image
[2] => Catagories
[3] => Tags
[4] => Content
)
[1] => Array
(
[0] => title 1
[1] => img1.jpg
[2] => cat 1
[3] => tag 1
[4] => post 1 content
)
[2] => Array
(
[0] => title 2
[1] => img2.jpg
[2] => cat2
[3] => tag 2
[4] => post 2 content
)
[3] => Array
(
[0] => title 3
[1] => img3.jpg
[2] => cat3
[3] => tag3
[4] => post 3 content
)
}
Ich habe zwei Tabellen-
1) sa_posts
2) sa_terms
In sa_posts Tabelle möchte ich Titel, Bild, Inhalt und in Sa_terms Tabelle speichern Ich muss Kategorien und Tags speichern.
Wie ist das mit foreach oder for loop möglich?