I had got it working but the small problem that remained with list() was that it INSERTED the selected value at the top in the list box rather than CHOOSING.
So, after lot of fiddling and referring to profile.php (modifyprofile_birthday template) I reached to this:-
PHP Code:
$row_timestamp = explode('-', vbdate('j-n-Y-H-i-s', $result['TIMESTAMP']));
$dayselected["$row_timestamp[0]"] = 'selected="selected"';
$monthselected["$row_timestamp[1]"] = 'selected="selected"';
$year = $row_timestamp[2];
$hour = $row_timestamp[3];
$minute = $row_timestamp[4];
$second = $row_timestamp[5];
and in template we can do this way:-
HTML Code:
<option value="1" $dayselected[1]>01</option>
<option value="2" $dayselected[2]>02</option>
<option value="3" $dayselected[3]>03</option>
and so on...
Don't you think this is the better way? coz this works perfect and it chooses instead of inserting.
Thanks