title: How can I print Object's value in PHP which is fetched row from SQL?
body: <p>I have tried to print values of my PHP object '$mon' which is having average of all months.....</p>
  
  <p>and My code for data fetch is as</p>
  
  <pre><code>$result = mysql_query("SELECT b_year, sum(m1) as m1, sum(m2) as m2, sum(m3) as m3, sum(m4) as m4, sum(m5) as m5, sum(m6) as m6, sum(m7) as m7, sum(m8) as m8, sum(m9) as m9, sum(m10) as m10, sum(m11) as m11, sum(m12) as m12  
              from s_budgets as b INNER JOIN users as u on b.u_id = u.id WHERE b_year=YEAR( CURDATE( ) )
  GROUP BY b_year " );
  $mon=mysql_fetch_array($result)
  </code></pre>
  
  <p>and my code for Displaying those values are as below....</p>
  
  <pre><code> &lt;?php echo $mon-&gt;m4;?&gt;,
   &lt;?php echo $mon-&gt;m5;?&gt;,
   &lt;?php echo $mon-&gt;m6;?&gt;,
  </code></pre>
  
  <p>how can I print the object '$mon' with its several properties?</p>