Welcome to WebmasterWorld Guest from 184.108.40.206
for example if $my_array = 15th of February, only '15th' appears when I try to use it in the way I mentioned (<input type=text name=date value=$my_array>) I also tried to use array element in mailto link for subject and had same problem.
The problem is in your HTML rather than the PHP. You need to enclose $my_array in quotes, or the other words following '15th' will be treated as tag attributes by the browser.
print("<input type=\"text\" name=\"date\" value=\"$my_array\">");
will do the trick - note that the "s are 'escaped' by using a backslash before them to avoid syntax errors.
It's a good idea to get into the habit of enclosing all HTML attribute values in quotes, as it's required in XML and XTML which is where we're all heading eventually... so, your line would look something like:
<? print("<a href=\"mailto:$my_array?subject=$my_array\">"); ?>
Does that work for you?