Getting multiple value from another column for a single column type
<p>I want to retrieve more than one <code>offer_title</code>, offer price etc for a single store value but only one offer is returning. There is more than one store offer for a particular store in the database. How to do so?</p>

<p>Here is my code:</p>

<pre><code>&lt;?php 

$sql ="SELECT * , Offer_Master.Store_id 
        FROM Store_Master_Profile 
            INNER JOIN Offer_Master 
                ON Store_Master_Profile.Store_Name = Offer_Master.Store_id 
                AND Store_Master_Profile.tag like '%Electronics%' 
        LIMIT 0 , 300 ";

require_once('Config.php');

$r = mysqli_query($con,$sql);

$result = array();

while($row = mysqli_fetch_array($r)){
    array_push($result,array(
                    'storephoto'=&gt;$row['storephoto'],
                    'Store_Name'=&gt;$row['Store_Name'],
                    'Store_email'=&gt;$row['email'],
                    'City_id'=&gt;$row['City_id'],
                    'Area_id'=&gt;$row['Area_id'],
                    'Address'=&gt;$row['Address'],
                    'Latitude'=&gt;$row['Latitude'],
                    'Longitude'=&gt;$row['Longitude'],
                    'mobile'=&gt;$row['mobile'],
                    'Store_Feature'=&gt;$row['Store_Feature'],
                    'tag'=&gt;$row['tag'],
                    'storeimages'=&gt;$row['storeimages'],
                    'workingdays'=&gt;$row['workingdays'],
                    'fromtime'=&gt;$row['fromtime'],
                    'totime'=&gt;$row['totime'] ,
                    'Offer_Title'=&gt;$row['Offer_Title'],
                    'MRP_Price'=&gt;$row['MRP_Price'],
                    'Actual_Price'=&gt;$row['Actual_Price'],
                    'Description'=&gt;$row['Description'],
                    'Expiry_Date'=&gt;$row['Expiry_Date']  
                    )
            );

}

echo json_encode(array('result'=&gt;$result));

mysqli_close($con);
</code></pre>