title: How to call a function in a string using PHP
body: <p>I wrote a function to dynamically insert the default date in a drop down option tag. In my function called <code>pickDate</code> I echo out the string at the end with double quotes. Then later in my code I have a for loop that produces a new string and inside the string I am trying to call my function.</p>
  <p>My problem is that when I call <code>pickDate()</code> in my string it is rendering out <code>pickdate()</code> (literally) and not the result of the function. Looking at my code, my question is : how do I call a function within a string surrounded by double quotes.</p>
  <p>I want to know how I can call it in the string in this for loop below:</p>
  <pre class="lang-php prettyprint-override"><code>&lt;?php
  $displayFolder .= &quot;&lt;form action='gallery.php' enctype='multipart/form-data' method='post' name='editPic' 
  
  id='editPic'&gt;&lt;tr&gt;&lt;td&gt;
  pickDate()
  &lt;input type ='text' name='year' size='4'maxlength='4' 
  
  value='$year'/&gt;&lt;/form&gt;&lt;/td&gt; &lt;/tr&gt;&quot;;
  ?&gt;
  </code></pre>
  <p>So the problem again is calling the pickDate function cause it is in a string and I would like to know how I can out put the <code>pickDate()</code> result in the table. I like how it is all surrounded by double quotes. Can someone please tell me how to call the function properly in the string without having to change my string to much.</p>