for example if $my_array[0] = 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[0]>) 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[0] in quotes, or the other words following '15th' will be treated as tag attributes by the browser.
Using
<?
print("<input type=\"text\" name=\"date\" value=\"$my_array[0]\">");
?>
will do the trick - note that the "s are 'escaped' by using a backslash before them to avoid syntax errors.
I tried enclosing these in escaped quotes but it still didn't work. Any idea on this one?
Thanks heaps for your help...
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[2]?subject=$my_array[3]\">"); ?>
Does that work for you?
Thanks heaps :-)