Arkadaşlar alttaki şekildeki verileri sayfa her yenilendiğinde rastgele birini ekrana yazdırmak istiyorum bunun için pratik bir yol paylaşabilecek varmı site wp.
<a href="<?php echo $next_attachment_url; ?>">text1 <?php the_title(); ?></a>
<a href="<?php echo $next_attachment_url; ?>">text2 <?php the_title(); ?></a>
<a href="<?php echo $next_attachment_url; ?>">text3 <?php the_title(); ?></a>
<a href="<?php echo $next_attachment_url; ?>">text4 <?php the_title(); ?></a>
rastgele veri yazdırma
2
●415
- 16-05-2014, 01:42:09Üyeliği durduruldu
$veriler = array( '<a href="'.$next_attachment_url.'">text1 '.the_title().'</a>', '<a href="'.$next_attachment_url.'">text1 '.the_title().'</a>', '<a href="'.$next_attachment_url.'">text1 '.the_title().'</a>', '<a href="'.$next_attachment_url.'">text1 '.the_title().'</a>', '<a href="'.$next_attachment_url.'">text1 '.the_title().'</a>' ); $karistir = array_rand($veriler); echo $karistir;
- 16-05-2014, 02:22:49çalıştı çok teşekkürler.PhpDeveloper adlı üyeden alıntı: mesajı görüntüle