postingan selalu mengikut yang pertama


<?php
$query=mysql_query("select * from galeri order by idgaleri desc");
while($data=mysql_fetch_array($query)){
$nim = $data['nim'];
$query2=mysql_query("select * from mahasiswa where nim='$nim'");
$data2=mysql_fetch_array($query2)
?>
    <div class="col-sm-3 col-md-3" >
    <div class="thumbnail">
      <center>
        <iframe width="250" src="<?php echo $data['linkytb'];?>"></iframe>
         </center>
          <div class="caption">

              <?php
		$text 		= $data2['judul_ta'];
	        $pjg_text = strlen($data2['judul_ta']);
		$tampilText0 = $data2['judul_ta'];
		$max_char 	= 60;
		if($pjg_text>60){
		$cut_text 	= substr($text, 0, $max_char);
	if ($text{$max_char - 1} != ' ') { // if the 45th character not a space
	$new_pos = strrpos($cut_text, ' '); // find the space from the last character
	$cut_text = substr($text, 0, $new_pos);}
	$tampilText0 = $cut_text . '...';}
	 ?>
                  <h5><b><?php echo $tampilText0;?></b></h5>
                  <?php
		$text 	= $data['deskripsi'];
	        $pjg_text = strlen($data['deskripsi']);
		$tampilText = $data['deskripsi'];
		$max_char 	= 60;
		if($pjg_text>60){
		$cut_text 	= substr($text, 0, $max_char);
		if ($text{$max_char - 1} != ' ') { // if the 45th character not a space
                $new_pos = strrpos($cut_text, ' '); // find the space from the last character
		$cut_text= substr($text, 0, $new_pos);}
	        $tampilText = $cut_text . '...';}
		?>

sistem management mengikut yg pertama jadi gimana caranya supaya ngga ngikut

avatar izay
@izay

1 Kontribusi 0 Poin

Diperbarui 5 tahun yang lalu

1 Jawaban:

saya kurang mengerti masalahnya, perbiasakan jelaskan masalahnya supaya bisa di analisis, jangan cuman screenshot code nya

avatar arhen03
@arhen03

55 Kontribusi 23 Poin

Dipost 5 tahun yang lalu

Login untuk ikut Jawaban