• 18-04-2019, 19:26:25
    #1
    arkadaşlar aşağıda vereceğim kodda her resme ayrı link eklemek istiyorum yardım edebilecek var mı ?
            $resimler = [
    'https://www.aselnakliyat.gen.tr/wp-content/uploads/2019/04/ihlas.png',
    'https://www.aselnakliyat.gen.tr/wp-content/uploads/2019/04/asel.png',
    'https://www.aselnakliyat.gen.tr/wp-content/uploads/2019/04/anadolu.png',
    
    ];
    
    shuffle($resimler);
    
    foreach ($resimler as $resim){
    echo '<img src="'.$resim.'"width="650" height="160">';
    }
  • 18-04-2019, 19:33:59
    #2
    Kimlik doğrulama veya yönetimden onay bekliyor.
    @EmreCapan;
  • 18-04-2019, 19:41:44
    #3
    <?php
    $resimler = [
    'https://www.aselnakliyat.gen.tr/wp-content/uploads/2019/04/ihlas.png',
    'https://www.aselnakliyat.gen.tr/wp-content/uploads/2019/04/asel.png',
    'https://www.aselnakliyat.gen.tr/wp-content/uploads/2019/04/anadolu.png',
    
    ];
    
    shuffle($resimler);
    
    foreach ($resimler as $resim){
    if(strpos($resim, "ihlas"))
    {
    $link ="ihlas.com";
    }
    else if(strpos($resim, "asel"))
    {
    $link ="asel.com";
    }
    else if(strpos($resim, "anadolu"))
    {
    $link ="anadolu.com";
    }
    else
    {
    $link = "#";
    }
    
    echo '<a href="'.$link.'"> <img src="'.$resim.'"width="650" height="160"> </a>';
    
    }
    
    ?>
  • 18-04-2019, 19:45:00
    #4
    mustaizm adlı üyeden alıntı: mesajı görüntüle
    <?php
    $resimler = [
    'https://www.aselnakliyat.gen.tr/wp-content/uploads/2019/04/ihlas.png',
    'https://www.aselnakliyat.gen.tr/wp-content/uploads/2019/04/asel.png',
    'https://www.aselnakliyat.gen.tr/wp-content/uploads/2019/04/anadolu.png',
    
    ];
    
    shuffle($resimler);
    
    foreach ($resimler as $resim){
    if(strpos($resim, "ihlas"))
    {
    $link ="ihlas.com";
    }
    else if(strpos($resim, "asel"))
    {
    $link ="asel.com";
    }
    else if(strpos($resim, "anadolu"))
    {
    $link ="anadolu.com";
    }
    else
    {
    $link = "#";
    }
    
    echo '<a href="'.$link.'"> <img src="'.$resim.'"width="650" height="160"> </a>';
    
    }
    
    ?>
    buradaki linkler örneğin: tel:1234567898 şeklinde kullanılabilir mi ?
  • 18-04-2019, 19:47:55
    #5
    malih adlı üyeden alıntı: mesajı görüntüle
    buradaki linkler örneğin: tel:1234567898 şeklinde kullanılabilir mi ?
    Evet kullanabilirsiniz,

     $link ="ihlas.com";
    yerine
     $link ="tel:1234567898";
    kullababilirsiniz
  • 18-04-2019, 19:50:29
    #6
    mustaizm adlı üyeden alıntı: mesajı görüntüle
    Evet kullanabilirsiniz,

     $link ="ihlas.com";
    yerine
     $link ="tel:1234567898";
    kullababilirsiniz
    Aynen hocam öyle yaptım ama asel ile anadolu linklarini faklı yazıyorum aynı gözüküyor ?
  • 18-04-2019, 19:54:51
    #7
    <?php
    $resimler = [
    'https://www.aselnakliyat.gen.tr/wp-content/uploads/2019/04/ihlas.png',
    'https://www.aselnakliyat.gen.tr/wp-content/uploads/2019/04/asel.png',
    'https://www.aselnakliyat.gen.tr/wp-content/uploads/2019/04/anadolu.png',
     
    ];
     
    shuffle($resimler);
     
    foreach ($resimler as $resim){
    if(strpos($resim, "ihlas.png"))
    {
        $link ="ihlas.com";
    }
    else if(strpos($resim, "asel.png"))
    {
        $link ="asel.com";
    }
    else if(strpos($resim, "anadolu.png"))
    {
        $link ="anadolu.com";
    }
    else
    {
        $link = "#";
    }
    
    echo '<a href="'.$link.'"> <img src="'.$resim.'"width="650" height="160"> </a>';
    
    }
    
    ?>
  • 18-04-2019, 19:57:07
    #8
    mustaizm adlı üyeden alıntı: mesajı görüntüle
    <?php
    $resimler = [
    'https://www.aselnakliyat.gen.tr/wp-content/uploads/2019/04/ihlas.png',
    'https://www.aselnakliyat.gen.tr/wp-content/uploads/2019/04/asel.png',
    'https://www.aselnakliyat.gen.tr/wp-content/uploads/2019/04/anadolu.png',
     
    ];
     
    shuffle($resimler);
     
    foreach ($resimler as $resim){
    if(strpos($resim, "ihlas.png"))
    {
        $link ="ihlas.com";
    }
    else if(strpos($resim, "asel.png"))
    {
        $link ="asel.com";
    }
    else if(strpos($resim, "anadolu.png"))
    {
        $link ="anadolu.com";
    }
    else
    {
        $link = "#";
    }
    
    echo '<a href="'.$link.'"> <img src="'.$resim.'"width="650" height="160"> </a>';
    
    }
    
    ?>
    Çok teşekkürler hocam oldu resim ekledikçe altın link ekleyerek devam edebiliriz ?
  • 18-04-2019, 19:59:42
    #9
    malih adlı üyeden alıntı: mesajı görüntüle
    Çok teşekkürler hocam oldu resim ekledikçe altın link ekleyerek devam edebiliriz ?
    Evet else ifleri kopyala yapıştır değiştir.

    else if(strpos($resim, "YeniResim.png"))
    {
        $link ="yenilink.com";
    }