title: Use of undefined constant error in php
body: <p>The following code </p>
  
  <pre><code>&lt;?php
   $email_domain = "abc@gmail.com";
   $email_user = "Roshan";
   $email_pass = "admin";
   $email_quota = "200";
   $call = array(domain=&gt;$email_domain, email=&gt;$email_user, password=&gt;$email_pass, quota=&gt;$email_quota);
  
   echo json_encode($call);
  ?&gt;
  </code></pre>
  
  <p>generated following error:</p>
  
  <pre><code>Notice: Use of undefined constant domain - assumed 'domain' in C:\xampp\htdocs\test2.php on line 7
  
  Notice: Use of undefined constant email - assumed 'email' in C:\xampp\htdocs\test2.php on line 7
  
  Notice: Use of undefined constant password - assumed 'password' in C:\xampp\htdocs\test2.php on line 7
  
  Notice: Use of undefined constant quota - assumed 'quota' in C:\xampp\htdocs\test2.php on line 7
  {"domain":"abc@gmail.com","email":"Roshan","password":"admin","quota":"200"}
  </code></pre>
  
  <p>I want to know the occurrence of this  and in this case what can be done to prevent this error.</p>