Allowed memory size of 134217728 bytes exhausted (tried to allocate 36 bytes)
<p>can anyone help me on this error!<br>
<strong>"Allowed memory size of 134217728 bytes exhausted (tried to allocate 36 bytes)"</strong><br><br>
this error occurs when i fetch record from database table of all courses available (total course are 84 in number).<br>My function is:-<br></p>

<pre><code>function allCouses()
{
    include 'connect.php';
    $qry = "SELECT * FROM master_course WHERE mc_enabled=1 AND mc_deleted=0";
    $data = mysqli_query($con, $qry);
    if(mysqli_num_rows($data))
    {
        $record = mysqli_fetch_assoc($data);
        while($record)
            $course[]=$record;
        return $course;
    }
}
</code></pre>

<p>the error occur When i store all the record in <code>$course[]</code>.</p>