Fork me on GitHub

Rapport de message :*
 

Re: un seul résultat avec foreach

Titre du sujet : Re: un seul résultat avec foreach
par montuy337513 sur 04/09/2012 11:57:48

j'ai oublié un foreach en route
<?php
$list_tag 
= array();
$sql10 'SELECT * FROM ' $xoopsDB -> prefix'test_articles' ) . 'ORDER BY RAND() ';
$result10 $xoopsDB -> query$sql1010);
//$articles_arr10 = $xoopsDB -> fetchArray( $result10 );
$i 0;
while(
$articles_arr10 $xoopsDB -> fetchArray$result10 )){ 
    
$tags_exploded[$i] = explode(" "$articles_arr10['title']);
    
$i++;
}
foreach(
$tags_exploded as $v) {
  foreach (
$v as $value){
    if (
strlen($value) > '5') {
        
$list_tag[] = '<a href="search.php?query=' $tags_exploded1 '&mid=8&action=showall&andor=AND">' $tags_exploded1 '</a></br>';
    }
  }
}
$xoopsTpl->assign('article11',$list_tag);
?>

Propulsé avec XOOPS | Graphisme adapté par Tatane, Grosdunord, Montuy337513

106 Personne(s) en ligne (76 Personne(s) connectée(s) sur Forum) | Utilisateur(s): 0 | Invité(s): 106 | Plus ...