Jump to content
php.lv forumi

sadalit pa blokiem


Trakais20

Recommended Posts

sveiki ir radusies maza problema ar blokiem

 

nevaru piedabut sos abus kodus kopa

 

so kodu

$result = mysql_query("SELECT * FROM img");
$i=0;
echo '<table>';
while($row = mysql_fetch_array($result)){
 ++$i;
 echo "<td><img src=" . $row['link']  . " /></td>";
 if($i%3==0){ echo '</tr><tr>'; }
}
echo '</table>';

 

pie sita

 

$img_array	= array();
while($result_img = mysql_fetch_object($resource_img)) 
{
$img_name			= $result_img->name;
$img_link			= $result_img->link;


$img_info = array(
"img_name"		=> $img_name,
"img_link"		=> $img_link,
);

$img_array[] = $img_info;
}	
//$img_array[] = $img_info;

 

$img_array ir domats preks smarty(templates)

 

ceru uz to ka varesiet palidzet ar kadu kodinu vai kadu linku kur var dabut info ka dabut abus kopa

 

 

 

Paldies jau ieprieks

Edited by Trakais20
Link to comment
Share on other sites

×
×
  • Create New...