bu divi her 2 tane de bir tekrarlamam gerekiyor nasıl yapabilirim
hangisi ile olur while, for,foreach |
10 Mesajlar | 930 Okunma |
$a = 0;
for (döngü...) {
++$a;
if (($a%2) === 0) {
echo '
';
}
}
$query_rew = $db->query("SELECT * FROM gorusler WHERE yayin='1' ORDER BY id DESC", PDO::FETCH_ASSOC);
if ( $query_rew->rowCount() ){
foreach( $query_rew as $rowrew ){
echo $rowrew['yorum']."
";
}
}
?>
$query_rew = $db->query("SELECT * FROM gorusler WHERE yayin='1' ORDER BY id DESC", PDO::FETCH_ASSOC);
if ( $query_rew->rowCount() ){
$a = 0;
foreach( $query_rew as $rowrew ){
++$a;
echo $rowrew['yorum']."
";
if (($a%2) === 0) {
echo '
';
}
}
}
divi aslında her 2 listelemede bir göstermesini istiyorum.
$query_rew = $db->query("SELECT * FROM gorusler WHERE yayin='1' ORDER BY id DESC LIMIT 12", PDO::FETCH_ASSOC);
if ( $query_rew->rowCount() ){
foreach( $query_rew as $rowrew ){
echo '
'.$rowrew['isim'].'
'.$rowrew['sehir'].'
'.$rowrew['yorum'].'
';
}
}
?>
$query_rew = $db->query("SELECT * FROM gorusler WHERE yayin='1' ORDER BY id DESC", PDO::FETCH_ASSOC);
if ( $query_rew->rowCount() ){
$numb = '1';
foreach( $query_rew as $rowrew ){
$numb++;
if ( is_int($numb / 2) ) { echo ''; }
echo $rowrew['yorum']."
";
if ( is_int($numb / 2) ) { echo ''; }
}
}
Vincent Wood
CEO / Gravity Inc.
He is a great and hardworking guy. I am so proud of i have him as my asistant. He helped me so much. Also i am so proud of i have him as my asistant. He helped me so much.
Jason Wilson
Lab Geek / Miami Metro
He is ok. I don't really know him. He looks nice.
Gary Morgan
Chemist / Freelancer
He was a great co-worker and a friend. I would't be where i am without his support.
Vincent Wood
CEO / Gravity Inc.
He is a great and hardworking guy. I am so proud of i have him as my asistant. He helped me so much. Also i am so proud of i have him as my asistant. He helped me so much.