Jump to content
php.lv forumi

datu ievietošana db no array


Vecteevs

Recommended Posts

Sveiki, man ir problēma ar datu ievietošanu datubāzē no array. tātad pieņemsim man ir šads array

Array(    
         	[0] => /viens
         	[1] => /divi  
         	[2] => /trīs    
         	[3] => /četri    
         	[4] => /pieci
		)

Bet skaits var turpināties līdz pat 100 vai pat vairāk.Mēģināju ievietot datus šādi

foreach($dati[1] as $cipari)

ievietojas tikai pēdējais skaitlis.MMēģināju arī pašu array

$dati[1];

Bet iekš db ievietojas tikai "Array".Kā var izdarīt lai ievietojas visi ieraksti?</pre>

Edited by Vecteevs
Link to comment
Share on other sites

sorry.. :D

tātad kods ir tāds

$content = file_get_contents($domain.$url);
preg_match_all($pattern, $content, $matches);
foreach($matches[1] as $value){
  			 echo "<b><font size=4>".$value."</font></b><br>";

Iegūstu content no kādas lapas un to vajag iemest manā datubāzē

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...