title: insert javascript into php
body: <p>I use the component datepicker in my php application and I want to affect the value of the datepiker component to an element of a php array like this : </p>
  
  <pre><code>&lt;?php
      if ($_SERVER["REQUEST_METHOD"] == "POST")
          $wish = array("id" =&gt; $_POST["wishID"], "description" =&gt; $_POST["wish"], "due_date" =&gt; .datepicker( "getDate" ));
      else
      if (array_key_exists("wishID", $_GET))
          $wish = mysqli_fetch_array(WishDB::getInstance()-&gt;get_wish_by_wish_id($_GET["wishID"]));
      else
          $wish = array("id" =&gt; "", "description" =&gt; "", "due_date" =&gt; "");
      ?&gt;
  </code></pre>
  
  <p>but I have an error when I run this page  : </p>
  
  <pre><code>Parse error: syntax error, unexpected 'getDate' (T_STRING), expecting ')' in C:\wamp\www\PhpProject1\editWish.php on line 48
  </code></pre>
  
  <p>and the error points on this row : </p>
  
  <pre><code>"due_date" =&gt; .datepicker( "getDate" )
  </code></pre>
  
  <p>how I can achieve this
  thanks,</p>