title: How do i send parameter in ajax function call in jquery
body: <p>I'm creating an online exam application in PHP and am having trouble with the AJAX calls. </p>
  
  <p>I want the questions to be fetched (and used to populate a div) using an AJAX call when one of the buttons on the right are clicked. These buttons are not static; they are generated on the server (using PHP). </p>
  
  <p><img src="https://i.stack.imgur.com/VPBKb.png" alt="Here is interface of front end"></p>
  
  <p>I'm looking for an AJAX call to be something like this:</p>
  
  <pre><code>functionname=myfunction(some_id){
  ajax code
  success: 
  html to question output div
  }
  </code></pre>
  
  <p>and the button should call a function like this:</p>
  
  <pre><code>&lt;button class="abc" onclick="myfunction(&lt;?php echo $question-&gt;q_id ?&gt;)"&gt;
  </code></pre>
  
  <p>Please suggest an AJAX call that would make this work</p>