I had a strange problem: I have php inserting text in <textarea>, and <textarea>adds one space to the beginning of my text.
I created an example page to display the problem ... here is the code behind the page.
<textarea style="width:600px;height:100px;"><?php get_film_info('main description'); ?></textarea>
<br>
<textarea id="mainDescription style="width:600px;height:100px;">Text just typed in</textarea>
<br>
<?php get_film_info('main description'); ?>
You can see that without a tag, the <textarea>text does not include indentation. My database also does not reflect indentation as well as php output outside <textarea>...
Is it possible to understand what can happen?
sample page
Edit: Everything is fine with you, of course, I did not check the source code of the output file. It turns out that when I added data (via ajax), I sent my data, for example var data = '&main_description= ' + mainDescription. Note the space between "=" and "+".
, .