Sephy Posted September 8, 2011 Report Share Posted September 8, 2011 (edited) Tatad ir masivs ar bilžu linkiem $arr = array(); Bildes masiva ir dinamiskas(mainas gan nosaukumi gan bilžu skaits). Kā lai izdara ta, lai bildes izpostotjas shada formata: <li><img src="/bilde1.jpg"/></li> <li><img src="/bilde2.jpg"/></li> <li><img src="/bilde3.jpg"/></li> Edited September 8, 2011 by Sephy Quote Link to comment Share on other sites More sharing options...
codez Posted September 8, 2011 Report Share Posted September 8, 2011 ar foreach ciklu iet cauri masīvam. Quote Link to comment Share on other sites More sharing options...
Sephy Posted September 8, 2011 Author Report Share Posted September 8, 2011 (edited) Ka īsti vispār var izvadīt php vērtību kā html source?? Edited September 8, 2011 by Sephy Quote Link to comment Share on other sites More sharing options...
daGrevis Posted September 8, 2011 Report Share Posted September 8, 2011 Izvadīt var ar echo. Tālāk, ko Tu izvadi (plain text, HTML, XML, JSON utml.), jau PHP neinteresē... tikai parūpējies par eskeipošanu! echo '<ul>'; foreach ($images as $image) { echo '<li><img src="' . $image . '"/></li>'; } echo '</ul>'; Quote Link to comment Share on other sites More sharing options...
Sephy Posted September 8, 2011 Author Report Share Posted September 8, 2011 (edited) Ka var dabut vienkarshi <li><img src="/bilde1.jpg"/></li> lai to varetu izmantot ieksh html???????? <?php echo '<li><img src="/bilde1.jpg"/></li>'; ?> nekam neder Edited September 8, 2011 by Sephy Quote Link to comment Share on other sites More sharing options...
Val Posted September 8, 2011 Report Share Posted September 8, 2011 Šodien taču nav 1. aprīlis... Quote Link to comment Share on other sites More sharing options...
Sephy Posted September 8, 2011 Author Report Share Posted September 8, 2011 Ok es it ka dabuju risinajumu jaraksta luk ta <li><?php echo '<li><img src="bilde1.jpg"/></li>';?></li> Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted September 8, 2011 Report Share Posted September 8, 2011 o_O kam tev baazt li ieksh veelviena li? Tev sanaaks shaadi tavaa piemeeraa: <li><li><img src="bilde1.jpg" /></li></li> Quote Link to comment Share on other sites More sharing options...
daGrevis Posted September 8, 2011 Report Share Posted September 8, 2011 Piebiedrošos Sephy.... Quote Link to comment Share on other sites More sharing options...
Sephy Posted September 8, 2011 Author Report Share Posted September 8, 2011 Nenemiet vera manus murgus, es uztaisiju epic fail, aizmirsu parsaukt .html failu par .php. Strada daGrevis variants loti labi paldies! p.s. sodien esmu tads stulbs laikam tapec ka piedzeros kvasu(0.5% gradi ka neka). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.