What plugin should I use to paginate the output of the below PHP foreach (around 400 <articles>):
<div id="hotel-list" class="hotel-list listing-style3 hotel">
<?php foreach ($hotelName as $index => $name):?>
<article class="box" data-board="<?php echo $board[$index];?>" data-stars="<?php echo $StarRating[$index];?>" name="<?php echo $hotelName[$index];?>" data-price="<?php $pret1 =$hotelPrices[$index];echo round($pret1 + ($pret1 * 0.20));?>">
<figure class="col-sm-5 col-md-4">
<a title=""><img width="270" height="160" alt="" src="<?php echo $img[$index][0];?>"></a>
</figure>
<div class="details col-sm-7 col-md-8">
<div>
<div>
<h3 class="box-title"><?php echo $name;?><small><i class="soap-icon-departure yellow-color"></i> <?php echo $hotelAddress[$index];?>, <?php echo $hotelDestination[$index];?></small></h3>
</div>
<div>
<div class="stars-<?php echo $StarRating[$index];?>-container">
<span class="stars-<?php echo $StarRating[$index];?>" style="width: 80%;"></span>
</div>
</div>
</div>
<div>
<div>
<p class="article-text"><label>Perioada: </label> <?php echo $In;?> - <?php echo $Out;?> <?php echo $adults;?> adulti / <?php echo $kids;?> copii; </p>
<p class="article-text"><label>Tip Masa: </label><?php echo $boardType[$index];?></p>
<p class="article-text"><label>Camera(e): </label><?php echo $availHotelss[$index]->rooms[0]->roomCategory;?> <?php echo $availHotelss[$index]->rooms[1]->roomCategory;?> <?php echo $availHotelss[$index]->rooms[2]->roomCategory;?> <?php echo $availHotelss[$index]->rooms[3]->roomCategory;?></p>
</div>
<div>
<span class="price"><small>De la</small>€<?php $pret1 =$hotelPrices[$index];echo round($pret1 + ($pret1 * 0.2)); ?></span>
<a class="button btn-small full-width text-center" title="" href="Hotel-Detalii.php?hotel=<?php echo $hotelCodes[$index];?>">DETALII</a>
</div>
</div>
</div>
</article>
<?php endforeach?>
</div>
I found only pagination plugin for MYSQL records.
Related
I have written some code for displaying a particular div in html. The code is shown below :
<div id="pdfdiv_1">
<section class="report">
<div class="top-box"></div>
<div class="row">
<div class="col-md-12 text-center">
<img src="<?php echo base_url()?>reports-assets-new/images/banner.png" class="bannerimg" style="
width: auto;">
</div>
<div class="col-md-5">
<div class="info-wrapper">
<?php if(!empty($user_details->st_profile)){ ?>
<img src="<?php echo base_url();?>uploads/user-profile/<?php echo $user_details->st_profile;?>" style="width: 22%;">
<?php } else {?>
<img src="<?php echo base_url()?>reports-assets-new/images/img2.png">
<?php } ?>
<div class="info-wrap-inner">
<p><span>Name </span> : <?php echo $user_details->st_name;?></p>
<p><span>Age </span> : <?php echo $age;?></p>
<p><span>Education </span> : <?php echo $user_details->st_qualification;?></p>
<p><span>Mobile </span> : <?php echo $user_details->st_mobile;?></p>
<p><span>Email </span> : <?php echo $user_details->st_email;?></p>
<p><span>Date of test </span> : <?php $s=$user_details->c_date; $dt = new DateTime($s); $date = $dt->format('d-m-Y'); echo $date; ?></p>
</div>
</div>
</div>
<div class="col-md-7 report-wrapper">
<h1 class="heading">SKILL FINDER TEST REPORT</h1>
<p><?php echo $test_details->description;?></p>
</div>
</div>
</div>
</section>
<section class="skills">
<div class="container">
<div class="row">
<div class="col-md-12">
<h1><span>IDENTIFY SKILLS BASED ON YOUR INTERESTS</span></h1>
</div>
</div>
<div class="row">
<?php echo $test_details->description3;?>
</div>
</section>
</div><!-- pdfdiv close -->
I have written a code for displaying the div pdfdiv_1 in jquery as shown below :
<script>
function pdfP(exam_id,test_id,base_url) {
var test = document.getElementById('pdfdiv_1').innerHTML;
console.log(test);
$.ajax({
type: 'POST',
data: {test : test,exam_id:exam_id,test_id:test_id},
url: base_url+"reports/reports_pdf_new/skill_finder",
success: function (data) {
window.location.href = base_url+"reports_pdf_new/"+exam_id+"/"+test_id;
},
});
}
</script>
When I am printing the console output, it is only printing the first section part but not the second section tag.
The output in console is :
<section class="report">
<div class="top-box"></div>
<div class="row">
<div class="col-md-12 text-center">
<img src="<?php echo base_url()?>reports-assets-new/images/banner.png" class="bannerimg" style="
width: auto;">
</div>
<div class="col-md-5">
<div class="info-wrapper">
<?php if(!empty($user_details->st_profile)){ ?>
<img src="<?php echo base_url();?>uploads/user-profile/<?php echo $user_details->st_profile;?>" style="width: 22%;">
<?php } else {?>
<img src="<?php echo base_url()?>reports-assets-new/images/img2.png">
<?php } ?>
<div class="info-wrap-inner">
<p><span>Name </span> : <?php echo $user_details->st_name;?></p>
<p><span>Age </span> : <?php echo $age;?></p>
<p><span>Education </span> : <?php echo $user_details->st_qualification;?></p>
<p><span>Mobile </span> : <?php echo $user_details->st_mobile;?></p>
<p><span>Email </span> : <?php echo $user_details->st_email;?></p>
<p><span>Date of test </span> : <?php $s=$user_details->c_date; $dt = new DateTime($s); $date = $dt->format('d-m-Y'); echo $date; ?></p>
</div>
</div>
</div>
<div class="col-md-7 report-wrapper">
<h1 class="heading">SKILL FINDER TEST REPORT</h1>
<p><?php echo $test_details->description;?></p>
</div>
</div>
</div>
</section>
Can anyone help me out in this ?
I cant print all the html code present inside the div pdfdiv_1.
The html code :
<div class="download-pdf">
<div class="row">
<div class="col-12">
<div class="card p-4 mt-0">
<h2 class="text-center mb-0">Congratulations!</h2>
<p class="lead text-center" style="margin-top: -18px">
<br>
<div class="button-wrapper" style="text-align: center;">
<button onclick="pdfP(<?php echo $exam_id;?>,<?php echo $test_id;?>,'<?php echo base_url();?>')" class="btn btn-primary d-block mx-auto">Download PDF</button>
<span id="pdfloader"></span>
</div>
</div>
</div>
</div>
</div>
There are some mistakes on html tags placement.
This code might fix them :
<div id="pdfdiv_1">
<section class="report">
<div class="top-box"></div>
<div class="row">
<div class="col-md-12 text-center">
<img src="<?php echo base_url()?>reports-assets-new/images/banner.png" class="bannerimg" style="
width: auto;">
</div>
<div class="col-md-5">
<div class="info-wrapper">
<?php if(!empty($user_details->st_profile)){ ?>
<img src="<?php echo base_url();?>uploads/user-profile/<?php echo $user_details->st_profile;?>" style="width: 22%;">
<?php } else {?>
<img src="<?php echo base_url()?>reports-assets-new/images/img2.png">
<?php } ?>
<div class="info-wrap-inner">
<p><span>Name </span> : <?php echo $user_details->st_name;?></p>
<p><span>Age </span> : <?php echo $age;?></p>
<p><span>Education </span> : <?php echo $user_details->st_qualification;?></p>
<p><span>Mobile </span> : <?php echo $user_details->st_mobile;?></p>
<p><span>Email </span> : <?php echo $user_details->st_email;?></p>
<p><span>Date of test </span> : <?php $s=$user_details->c_date; $dt = new DateTime($s); $date = $dt->format('d-m-Y'); echo $date; ?></p>
</div>
</div>
</div>
<div class="col-md-7 report-wrapper">
<h1 class="heading">SKILL FINDER TEST REPORT</h1>
<p><?php echo $test_details->description;?></p>
</div>
</div>
</section>
<section class="skills">
<div class="container">
<div class="row">
<div class="col-md-12">
<h1><span>IDENTIFY SKILLS BASED ON YOUR INTERESTS</span></h1>
</div>
</div>
<div class="row">
<?php echo $test_details->description3;?>
</div>
</div>
</section>
</div><!-- pdfdiv close -->
Generally the IDE show these errors in red.
Example with IntelliJ softwares :
Have a website in three languages. The porducts select from a mysql database and showed wiht a do-while-loop.
<!-- Shop Page Area Start-->
<div class="shoppage-area">
<div class="container">
<div class="about-desc">
<h2>
<?php echo $page['subtitle']; ?>
</h2>
<?php echo $page['content']; ?>
</div>
<div class="row">
<?php
do {
?>
<!--Product Start-->
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="sngle-product">
<div class="product-thumb">
<img src="<?php echo $product['img']; ?>" alt=""/>
<h2>
<a href="#">
<?php echo $product['name']; ?>
</a>
</h2>
</div>
<h3>
<?php echo $product['desc']; ?>
</h3>
<span><?php echo $product['size']; ?></span> <span class="price"><?php echo $product['price']; ?> LE</span>
<div class="product-overlay">
<ul>
<li>
<div class="product-quantity">
<div class="input-number">
<input type="text" value="1" name="quantity">
</div>
</div>
</li>
<li><a class="orderbtn" href="#" data-uid="<?php echo $product['uniqueid']; ?>">ORDER</a></li>
</ul>
</div>
</div>
</div>
<!-- Product End -->
<?php
} while ($product = $res->fetch_assoc()) ?>
</div>
<!-- end Row -->
</div>
</div>
The problem is that in one language showed correctly and in the other i get a lot spaces between the products. See the image
enter image description here
How i can solve this
Add an additional class flex-row to the product wrapping row element. And try applying the following styles.
.flex-row{
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
You can divide your column like this
<div class="shoppage-area">
<div class="container">
<div class="about-desc">
</div>
<div class="row">
<?php $i=1;
do {
?>
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="sngle-product">
<div class="product-thumb">
<img src="<?php echo "test"; ?>" alt=""/>
<h2><?php echo "test"; ?> </h2>
</div>
<h3><?php echo ($i==2)? " testtesttesttesttesttest testtesttesttest test": "test"; ?></h3>
<span><?php echo "test"; ?></span> <span class="price"><?php echo 12321; ?> LE</span>
<div class="product-overlay">
<ul>
<li>
<div class="product-quantity">
<div class="input-number">
<input type="text" value="1" name="quantity">
</div>
</div>
</li>
<li><a class="orderbtn" href="#" data-uid="<?php echo "1231"; ?>">ORDER</a></li>
</ul>
</div>
</div>
</div>
<?php
echo $i%4;
if($i%4== 0 && $i > 1) {
echo '</div><div class="row">';
}
$i++;
} while ($i<=10) ?>
</div>
</div>
</div>
It should be like this:
<div> code here </div>
<div> code here </div>
<div> code here </div>
Each div looping right after the other. Instead, it is executing like this:
<div> code here </div>
<div> code here </div>
<div> code here </div>
Page I am working on: http://www.equitasmg.com/who-we-are-2/
The images are not aligned (should be in a row).
Here's the PHP:
<center><h2>Our Leadership</h2></center>
<?php
$people= get_field('people');
$a=0;
foreach ($people as $r) {
$a++;
?>
<div style="float:left;width:30%;padding:30px;">
<img src="<?php echo $r['image']['sizes']['team'];?>" style="max-width:750px !important;width:250px;">
<h3>
<?php echo $r['name'];?>
</h3>
<div class="position">
<?php echo $r['position'];?>
</div>
<?php echo $r['intro_text'];?>
<?php if ($r[ 'learn_more_text']) { ?>
Learn More
<?php } ?>
<?php if ($r[ 'learn_more_text']) { ?>
<div id="<?php echo sanitize_title($r['name'] );?>" class="reveal-modal medium" data-reveal aria-labelledby="modalTitle" aria-hidden="true" role="dialog">
<h3><?php echo $r['name'];?></h3>
<div class="position">
<?php echo $r['position'];?>
</div>
<div class="content">
<?php echo $r['learn_more_text'];?>
</div>
<a class="close-reveal-modal" aria-label="Close">×</a>
</div>
</div>
<?php } ?>
<?php } ?>
Here is the problem one div should between closing php tag
<a class="close-reveal-modal" aria-label="Close">×</a>
</div>
<?php } ?>
</div>
<?php } ?>
You don't need to float every div in loop just add a div before loop and float that div to left.
remove floating Style within loop.. here is your clean code.
JS BIN
<div style="float:left;width:30%;padding:30px;">
<?php
$people= get_field('people');
$a=0;
foreach ($people as $r) {
$a++;
?>
<div style="">
<img src="<?php echo $r['image']['sizes']['team'];?>" style="max-width:750px !important;width:250px;">
<h3>
<?php echo $r['name'];?>
</h3>
<div class="position">
<?php echo $r['position'];?>
</div>
<?php echo $r['intro_text'];?>
<?php if ($r[ 'learn_more_text']) { ?>
Learn More
<?php } ?>
<?php if ($r[ 'learn_more_text']) { ?>
<div id="<?php echo sanitize_title($r['name'] );?>" class="reveal-modal medium" data-reveal aria-labelledby="modalTitle" aria-hidden="true" role="dialog">
<h3><?php echo $r['name'];?></h3>
<div class="position">
<?php echo $r['position'];?>
</div>
<div class="content">
<?php echo $r['learn_more_text'];?>
</div>
<a class="close-reveal-modal" aria-label="Close">×</a>
</div>
</div>
<?php } ?>
<?php } ?>
<div style="clear:both;"></div>
</div>
I got 2 sections on a page. You can see it here: http://www.equitasmg.com/who-we-are-2/
Both sections have a <div> wrapped around them, but the first section "Our Leadership" seems to not like the <div>. The <div> wraps around the first item in the section but does not wrap around all the items.
Here is the PHP for both sections.
First section
<center><h2>Our Leadership</h2></center>
<center><div>
<?php
$people= get_field('people');
$a=0;
foreach ($people as $r) {
$a++;
?>
<div class="people">
<img src="<?php echo $r['image']['sizes']['team'];?>" style="max-width:750px !important;width:100%;">
<h3>
<?php echo $r['name'];?>
</h3>
<div class="position">
<h4><?php echo $r['position'];?></h4>
</div>
<?php echo $r['intro_text'];?>
<?php if ($r[ 'learn_more_text']) { ?>
Learn More
<?php } ?>
<?php if ($r[ 'learn_more_text']) { ?>
<div id="<?php echo sanitize_title($r['name'] );?>" class="reveal-modal medium" data-reveal aria-labelledby="modalTitle" aria-hidden="true" role="dialog">
<h3><?php echo $r['name'];?></h3>
<div class="position">
<?php echo $r['position'];?>
</div>
<div class="content">
<?php echo $r['learn_more_text'];?>
</div>
<a class="close-reveal-modal" aria-label="Close">×</a>
</div>
</div>
<?php } ?>
</div>
<?php } ?>
</div></center>
<div style="clear:both;"></div>
Second section
<center><h2>Our Team</h2></center>
<center><div>
<?php
$people2= get_field('people_bottomsection');
$a=0;
foreach ($people2 as $r) {
$a++;
?>
<div class="people">
<img src="<?php echo $r['image']['sizes']['team'];?>" style="max-width:750px !important;width:100%;">
<h3>
<?php echo $r['name'];?>
</h3>
<div class="position">
<h4><?php echo $r['position'];?></h4>
</div>
<?php echo $r['intro_text'];?>
<?php if ($r[ 'learn_more_text']) { ?>
Learn More
<?php } ?>
<?php if ($r[ 'learn_more_text']) { ?>
<div id="<?php echo sanitize_title($r['name'] );?>" class="reveal-modal medium" data-reveal aria-labelledby="modalTitle" aria-hidden="true" role="dialog">
<h3><?php echo $r['name'];?></h3>
<div class="position">
<?php echo $r['position'];?>
</div>
<div class="content">
<?php echo $r['learn_more_text'];?>
</div>
<a class="close-reveal-modal" aria-label="Close">×</a>
</div>
</div>
<?php } ?>
</div>
<?php } ?>
</div></center>
<div style="clear:both;"></div>
You just got extra div.
First section you got extra div here
<center><h2>Our Leadership</h2></center>
<center>
<div>
<?php
$people= get_field('people');
$a=0;
foreach ($people as $r) {
$a++;
?>
<div class="people">
<img src="<?php echo $r['image']['sizes']['team'];?>" style="max-width:750px !important;width:100%;">
<h3>
<?php echo $r['name'];?>
</h3>
<div class="position">
<h4><?php echo $r['position'];?></h4>
</div>
<?php echo $r['intro_text'];?>
<?php if ($r[ 'learn_more_text']) { ?>
Learn More
<?php } ?>
<?php if ($r[ 'learn_more_text']) { ?>
<div id="<?php echo sanitize_title($r['name'] );?>" class="reveal-modal medium" data-reveal aria-labelledby="modalTitle" aria-hidden="true" role="dialog">
<h3><?php echo $r['name'];?></h3>
<div class="position">
<?php echo $r['position'];?>
</div>
<div class="content">
<?php echo $r['learn_more_text'];?>
</div>
<a class="close-reveal-modal" aria-label="Close">×</a>
</div>
<!-- </div> --> //extra div here
<?php } ?>
</div>
<?php } ?> //end of foreach
</div>
</center>
<div style="clear:both;"></div>
second section
<center><h2>Our Team</h2></center>
<center>
<div>
<?php
$people2= get_field('people_bottomsection');
$a=0;
foreach ($people2 as $r) {
$a++;
?>
<div class="people">
<img src="<?php echo $r['image']['sizes']['team'];?>" style="max-width:750px !important;width:100%;">
<h3>
<?php echo $r['name'];?>
</h3>
<div class="position">
<h4><?php echo $r['position'];?></h4>
</div>
<?php echo $r['intro_text'];?>
<?php if ($r[ 'learn_more_text']) { ?>
Learn More
<?php } ?>
<?php if ($r[ 'learn_more_text']) { ?>
<div id="<?php echo sanitize_title($r['name'] );?>" class="reveal-modal medium" data-reveal aria-labelledby="modalTitle" aria-hidden="true" role="dialog">
<h3><?php echo $r['name'];?></h3>
<div class="position">
<?php echo $r['position'];?>
</div>
<div class="content">
<?php echo $r['learn_more_text'];?>
</div>
<a class="close-reveal-modal" aria-label="Close">×</a>
</div>
<!-- </div> --> //extra div
<?php } ?>
</div>
<?php } ?>
</div>
</center>
I want to use this code to get results from my database and show it in html but this is not happening. Getting all weird results and am not able to fix it.
it display } ? > on my webpage at the end wonder why.And i cannot get any results from my database displayed either.
Database is proper I believe some error in html and php code(php variables in html tags).
<?php
while($row = mysqli_fetch_array($result)) {
$price = ($row['ISBN']%1000);
echo $price;
<li>
<div class="book-display-bg">
<div class="book-display-placeholder">
<div class="book-display-container">
<div class="book-display-centered">
<a href='product/taqatu-niran-min-yaumiyat-al-intifada-as-suriya-9789953892368-(105523).html' >
<img src=''$row['Image_URL_M']'' style='border: 0;' alt=''$row['Book_Title']''/>
</a>
</div>
</div>
</div>
</div>
<div class="book-display-details">
<div class="book-display-title"><p><a href='product/taqatu-niran-min-yaumiyat-al-intifada-as-suriya-9789953892368-(105523).html' title=''$row['Book_Title']'' >$row['Book_Title']</a></p></div>
<div class="book-display-author"><p>$row['Book_Author']</p></div>
<div id="ctl00_ctl00_CMSContentMasterPlaceHolder_cphContent1_ctl01_ProductSummary1_DataList1_ctl02_divStock" class="book-display-stock"></div>
<div class="book-display-price">$price</div>
<input type="submit" name="ctl00$ctl00$CMSContentMasterPlaceHolder$cphContent1$ctl01$ProductSummary1$DataList1$ctl02$btnBuyNow" value="add to basket" id="ctl00_ctl00_CMSContentMasterPlaceHolder_cphContent1_ctl01_ProductSummary1_DataList1_ctl02_btnBuyNow" title="add to basket" class="ecom-add-basket" />
</div>
<div class="clear"></div>
</li>
}
?>
Thanks in advance
You forget to add echo for the li element. You can try following:
<?php
while($row = mysqli_fetch_array($result)) {
$price = ($row['ISBN']%1000);
echo $price; ?>
<li>
<div class="book-display-bg">
<div class="book-display-placeholder">
<div class="book-display-container">
<div class="book-display-centered">
<a href='product/taqatu-niran-min-yaumiyat-al-intifada-as-suriya-9789953892368-(105523).html' >
<img src='<?php echo $row['Image_URL_M']; ?>' style='border: 0;' alt='<?php echo $row['Book_Title']; ?>'/>
</a>
</div>
</div>
</div>
</div>
<div class="book-display-details">
<div class="book-display-title"><p><a href='product/taqatu-niran-min-yaumiyat-al-intifada-as-suriya-9789953892368-(105523).html' title='<?php echo $row['Book_Title']; ?>' ><?php echo $row['Book_Title']; ?></a></p></div>
<div class="book-display-author"><p><?php echo $row['Book_Author']; ?></p></div>
<div id="ctl00_ctl00_CMSContentMasterPlaceHolder_cphContent1_ctl01_ProductSummary1_DataList1_ctl02_divStock" class="book-display-stock"></div>
<div class="book-display-price"><?php echo $price; ?></div>
<input type="submit" name="ctl00$ctl00$CMSContentMasterPlaceHolder$cphContent1$ctl01$ProductSummary1$DataList1$ctl02$btnBuyNow" value="add to basket" id="ctl00_ctl00_CMSContentMasterPlaceHolder_cphContent1_ctl01_ProductSummary1_DataList1_ctl02_btnBuyNow" title="add to basket" class="ecom-add-basket" />
</div>
<div class="clear"></div>
</li><?php
}
?>
or You can do it this way:
<?php
while($row = mysqli_fetch_array($result)) {
$price = ($row['ISBN']%1000);
echo $price;
echo '<li>
<div class="book-display-bg">
<div class="book-display-placeholder">
<div class="book-display-container">
<div class="book-display-centered">
<a href="product/taqatu-niran-min-yaumiyat-al-intifada-as-suriya-9789953892368-(105523).html" >
<img src="' . $row['Image_URL_M'] . '" style="border: 0;" alt="$row[\'Book_Title\']"/>
</a>
</div>
</div>
</div>
</div>
<div class="book-display-details">
<div class="book-display-title"><p><a href="product/taqatu-niran-min-yaumiyat-al-intifada-as-suriya-9789953892368-(105523).html" title="' . $row['Book_Title'] . '" >' . $row['Book_Title'] . '</a></p></div>
<div class="book-display-author"><p> ' .$row['Book_Author'] . '</p></div>
<div id="ctl00_ctl00_CMSContentMasterPlaceHolder_cphContent1_ctl01_ProductSummary1_DataList1_ctl02_divStock" class="book-display-stock"></div>
<div class="book-display-price">' . $price . '</div>
<input type="submit" name="ctl00$ctl00$CMSContentMasterPlaceHolder$cphContent1$ctl01$ProductSummary1$DataList1$ctl02$btnBuyNow" value="add to basket" id="ctl00_ctl00_CMSContentMasterPlaceHolder_cphContent1_ctl01_ProductSummary1_DataList1_ctl02_btnBuyNow" title="add to basket" class="ecom-add-basket" />
</div>
<div class="clear"></div>
</li>';
}
?>
hope it helped
Please do use open and close braces correctly.
If you want to use the HTMl code in php then all you have to do is echo
for example:
<?php
while($row = mysqli_fetch_array($result)) {
echo "<div class='book-display-centered'>{$row['Book_Author']}</div>"
}
?>
And since you have lot of data in html you can use it like this
<?php
while($row = mysqli_fetch_array($result)) {
?>
<div class='book-display-centered'><?php echo $row['Book_Author'] ?></div>
<?php
}
?>
You must echo html content or close php tag before them
Try this:
<?php
while($row = mysqli_fetch_array($result)) {
$price = ($row['ISBN']%1000);
echo $price;
?>
<li>
<div class="book-display-bg">
<div class="book-display-placeholder">
<div class="book-display-container">
<div class="book-display-centered">
<a href='product/taqatu-niran-min-yaumiyat-al-intifada-as-suriya-9789953892368-(105523).html' >
<img src="<?php echo $row['Image_URL_M']?>" style='border: 0;' alt=" <?php echo $row['Book_Title']?>"/>
</a>
</div>
</div>
</div>
</div>
<div class="book-display-details">
<div class="book-display-title"><p><a href='product/taqatu-niran-min-yaumiyat-al-intifada-as-suriya-9789953892368-(105523).html' title="<?php echo $row['Book_Title'] ?>" > <?php echo $row['Book_Title']?></a></p></div>
<div class="book-display-author"><p><?php echo $row['Book_Author'] ?></p></div>
<div id="ctl00_ctl00_CMSContentMasterPlaceHolder_cphContent1_ctl01_ProductSummary1_DataList1_ctl02_divStock" class="book-display-stock"></div>
<div class="book-display-price"><?php echo $price ?></div>
<input type="submit" name="ctl00$ctl00$CMSContentMasterPlaceHolder$cphContent1$ctl01$ProductSummary1$DataList1$ctl02$btnBuyNow" value="add to basket" id="ctl00_ctl00_CMSContentMasterPlaceHolder_cphContent1_ctl01_ProductSummary1_DataList1_ctl02_btnBuyNow" title="add to basket" class="ecom-add-basket" />
</div>
<div class="clear"></div>
</li>
<?php
}
?>
Use below code...
while($row = mysqli_fetch_array($result)) {
$price = ($row['ISBN']%1000);
echo $price;
?>
<li>
<div class="book-display-bg">
<div class="book-display-placeholder">
<div class="book-display-container">
<div class="book-display-centered">
<a href='product/taqatu-niran-min-yaumiyat-al-intifada-as-suriya-9789953892368-(105523).html' >
<img src=''$row['Image_URL_M']'' style='border: 0;' alt=''$row['Book_Title']''/>
</a>
</div>
</div>
</div>
</div>
<div class="book-display-details">
<div class="book-display-title"><p><a href='product/taqatu-niran-min-yaumiyat-al-intifada-as-suriya-9789953892368-(105523).html' title=''$row['Book_Title']'' >$row['Book_Title']</a></p></div>
<div class="book-display-author"><p>$row['Book_Author']</p></div>
<div id="ctl00_ctl00_CMSContentMasterPlaceHolder_cphContent1_ctl01_ProductSummary1_DataList1_ctl02_divStock" class="book-display-stock"></div>
<div class="book-display-price">$price</div>
<input type="submit" name="ctl00$ctl00$CMSContentMasterPlaceHolder$cphContent1$ctl01$ProductSummary1$DataList1$ctl02$btnBuyNow" value="add to basket" id="ctl00_ctl00_CMSContentMasterPlaceHolder_cphContent1_ctl01_ProductSummary1_DataList1_ctl02_btnBuyNow" title="add to basket" class="ecom-add-basket" />
</div>
<div class="clear"></div>
</li>
<?php
}
?>