title: Parse error: syntax error, unexpected 'â€“' (T_STRING)
body: <h2>this PROBLEM bug me out.</h2>
  
  <pre><code>Parse error: syntax error, unexpected 'â€“' (T_STRING) in C:\xampp\htdocs\*****\*****\functions.php on line 187
  </code></pre>
  
  <p>Line 187 across line 9 in the code box below. <strong>At</strong> <code>$zjd = (int)((1461...</code> </p>
  
  <h2>What is this ?</h2>
  
  <p>This is function prints out Hijri Calender, Which it depends on the moon, it different from the Gregorian calendar which it depends on the sun. <code>Date();</code> function prints out Gregorian date,and there isn't any function for the Hijri date (Called also Islamic Calender). and there is difference between these two. for example years in Gregorian Calendar is 365.25 but in Hijri Calender is 354.367. and also in months... etc.</p>
  
  <h2>What happened?</h2>
  
  <p>I made a function converts Gregorian to Hijri, but it wasn't that accurate so I searched the web for one.
  I found a lot accurate ones, but written in JavaScript. and Just found this fine only piece written in PHP.</p>
  
  <p>I tried to contact the writer about the problem but he didn't respond. posted this on 2011.</p>
  
  <h2>Part of the function</h2>
  
  <pre><code>function hijriCal(){
  $theDate     = getdate();
  $wday        = $theDate['wday'];
  $hr          = $theDate['mday'];
  $theMonth    = $theDate['mon'];
  $theYear     = $theDate['year'];
  
  if (($theYear &gt; 1582) || (($theYear == 1582) &amp;&amp; ($theMonth &gt; 10)) || (($theYear == 1582) &amp;&amp; ($theMonth == 10) &amp;&amp; ($hr &gt; 14))) {
  $zjd = (int)((1461 * ($theYear + 4800 + (int)(($theMonth – 14) / 12))) / 4) + (int)((367 * ($theMonth – 2 – 12 * ((int)(($theMonth – 14) / 12)))) / 12) – (int)((3 * (int)((($theYear + 4900 + (int)(($theMonth – 14) / 12)) / 100))) / 4) + $hr – 32075;
  } else {
  $zjd = 367 * $theYear – (int)((7 * ($theYear + 5001 + (int)(($theMonth – 9) / 7))) / 4) + (int)((275 * $theMonth) / 9) + $hr + 1729777;
  }
  </code></pre>
  
  <h2>Thanks in advance</h2>