Let's say I have a file which goes like this:
<?php
if(isset($_GET['cat_id'])){
$cat_id = $_GET['cat_id'];
$get_cat_pro = "select * from products where cat_id='$cat_id'";
$run_cat_pro = mysqli_query($con,$get_cat_pro);
while($row_cat_pro=mysqli_fetch_array($run_cat_pro)){
$pro_id = $row_cat_pro['product_id'];
$pro_title = $row_cat_pro['product_title'];
$pro_cat = $row_cat_pro['cat_id'];
$pro_brand = $row_cat_pro['brand_id'];
$pro_desc = $row_cat_pro['product_desc'];
$pro_price = $row_cat_pro['product_price'];
$pro_image = $row_cat_pro['product_img1'];
echo "
<section>
<div class='container'>
<div class='row'>
"include_once 'php/includes/overall/widget.php'"
<div class='col-sm-9 padding-right'>
<div class='features_items'><!--features_items-->
<h2 class='title text-center'>Products</h2>
<ul class='pagination'>
<li class='active'><a href="">1</a></li>
<li><a href=''>2</a></li>
<li><a href=''>3</a></li>
<li><a href=''>»</a></li>
</ul>
</div><!--features_items-->
</div>
</div>
</div>
</section>
";
}
}
?>
And in this file I want to echo out an include_once
command but I don't know the proper way to do this while echoing some html text.. So I get this error message as well:
Parse error: syntax error, unexpected 'include_once' (T_INCLUDE_ONCE), expecting ',' or ';' on line 19
And the line 19 is this:
"include_once 'php/includes/overall/widget.php'"
So how to correct this issue?