Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    Numero caratteri + AdSense

    In home ho una pagina che mi inserisce l'ultima news. La tabella è settata al 100% ma lateralmente ho messo dei banner a 600px in rotazione. Ora vorrei che se le battute della news sono ad esempio tra 400 e 700 mi deve comparire sotto al testo gli adsense di google se sono superiori a 700 niente. Questo è il mio codice
    Codice PHP:
    <?php
    include($path 'news/settings.php');

    $dbcon mysql_connect($db_server$db_user$db_passwd);
    mysql_select_db($db_name);

    $sql="SELECT * FROM phpnews_news ORDER BY id DESC LIMIT 1"
    $risultati=mysql_query($sql); 
    while(
    $riga=mysql_fetch_array($risultati)) { 

    $target=$riga["maintext"]; 
    $target1=$riga["subject"]; 
    $target2=$riga["postername"];

    echo
    " <div align=\"justify\">[b]<span class=\"style2\">$target1</span>[/b]
    <span class=\"style3\"> scritto da: 
    $target2 </span>

     <span class=\"style3\">
    $target</span></div>
    "

    }
    //Fine del while 

    ?>
    Mi aiutate please ?
    Grazie

  2. #2
    Codice PHP:
    $sql="SELECT * FROM phpnews_news ORDER BY id DESC LIMIT 1";
    $risultati=mysql_query($sql);
    while(
    $riga=mysql_fetch_array($risultati)) {

    $target=$riga["maintext"];
    $target1=$riga["subject"];
    $target2=$riga["postername"];
    $battute strlen($target);

    if(
    $battute '700') { $adsense 'qui metti il codice adsense'; } else { $andsense ''; }

    echo
    " <div align=\"justify\">[b]<span class=\"style2\">$target1</span>[/b]
    <span class=\"style3\"> scritto da: 
    $target2 </span>

     <span class=\"style3\">
    $target $adsense</span></div>
    "
    ;
    }
    //Fine del while 
    così?
    http://codecanyon.net/category/all?ref=Manuelandro
    And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
    memories to be made

  3. #3
    Preciso!Grande
    Sono in debito con te....
    Grazie
    S.

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.