Trakais20 Posted September 25, 2008 Report Share Posted September 25, 2008 (edited) 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 September 27, 2008 by Trakais20 Link to comment Share on other sites More sharing options...
andrisp Posted September 26, 2008 Report Share Posted September 26, 2008 Tas otrais kods ir nepareizs. Tev beigās $img_array saturēs tikai pēdējo elementu. Un kas tev tieši nesanāk ? Varbūt parādi, ko esi sameistarojis. Link to comment Share on other sites More sharing options...
Trakais20 Posted September 27, 2008 Author Report Share Posted September 27, 2008 Tas otrais kods ir nepareizs. Tev beigās $img_array saturēs tikai pēdējo elementu. Un kas tev tieši nesanāk ? Varbūt parādi, ko esi sameistarojis. ar otro kodi vis ir OK un problema ari atrisinata itka bet THX par to pasu Link to comment Share on other sites More sharing options...
Recommended Posts