• 17-02-2014, 20:52:31
    #1
    Merhaba Arkadaşlar ben tırnak içinde php fonksiyonu çalıştırmak istiyorum ama çalışmıyor hata da vermiyor kodlar
    <?php $renksiz = new WP_Query("cat='<? echo get_option('rehber_kampanyalarkatid');
    ?>'&showposts=6"); while($renksiz ->have_posts()) : $renksiz ->the_post();?>

    böyle yapınca bu kodda
    <? echo get_option('rehber_kampanyalarkatid');
    ?>
    tırnaklar olduğu için okumuyor ama bu şekil yapınca çalışıyor.

    <?php $renksiz = new WP_Query("cat='4'&showposts=6"); while($renksiz ->have_posts()) : $renksiz ->the_post();?>
  • 17-02-2014, 20:55:11
    #2
    tag içinde tekrar tag açmaya gerek yok hocam

    <?php 
    $renksiz = new WP_Query("cat='".get_option('rehber_kampanyalarkatid')."'&showposts=6"); while($renksiz ->have_posts()) : $renksiz ->the_post();?>
  • 17-02-2014, 20:56:27
    #3
    <?php tagından sonra tekrar <?php tagı açmaya çalışıyorsunuz dikkat edin.
  • 17-02-2014, 21:04:02
    #4
    ByAkman adlı üyeden alıntı: mesajı görüntüle
    tag içinde tekrar tag açmaya gerek yok hocam

    <?php 
    $renksiz = new WP_Query("cat='".get_option('rehber_kampanyalarkatid')."'&showposts=6"); while($renksiz ->have_posts()) : $renksiz ->the_post();?>
    Saolun Hocam çalıştı