Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
alex3 каза:Ето ти пример http://codepad.viper-7.com/mVXLub array_merge + serialize.
relax4o каза:http://codepad.viper-7.com/gM7Gt2 ето така.
foreach($new as $k => $v){
foreach($v as $kk => $vv){
echo "Array: {$k} --- Value: {$vv}\n";
}
}
relax4o каза:PHP:$i = 0; while($i != sizeof($pics)){ // това е, ако реално и трите масива са с еднаква дължина mysql_query("NSERT INTO `test`(`pics`, `links`, `times`) VALUES ('{$pics[$i]}', '{$links[$i]}', '{$times[$i]}')"); $i++; }
Ето ти. Ти си оправи заявката вече, както е при теб.
preg_match_all('/<img id=\"thumb[0-9]+\" src=\"(.+)\" num=\"([0-9]+)\" width=\"160\" height=\"120\"/i', $as, $pics); //SNIMKI
preg_match_all('/<h1><a href=\"(.+)\">(.+)<\/a><\/h1>/i', $as, $links); //linkove
preg_match_all('/<h2>([0-9]+)<span>:<\/span>([0-9]+)<\/h2>/i', $as, $times); //vreme
$i = 0;
while($i != 5){
mysql_query("INSERT INTO `amateur`(`image`, `header`, `time`)
VALUES ('$pics[$i]', '$links[$i]', '$times[$i]')") or die(mysql_error());
$i++;
}
mysql_query("INSERT INTO `amateur`(`image`, `header`, `time`)
VALUES ('$pics[1][$i]', '$links[1][$i]', '$times[1][$i]')")
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's candy')' at line 1