Hi there,

I’m writing some joomla code for a customer and when I use this in my view template:

<textarea class="text_area" name="notes_campaign" id="notes_campaign" rows="5" cols="30">
 <?php echo trim($this->campaign->notes_campaign);?>
</textarea>

I always get some extra white space and can’t erase them using trim, or any other technique.

After an hour of google this without success, I tried to rewrite my code like this:

<textarea class="text_area" name="notes_campaign" id="notes_campaign" rows="5" cols="30"><?php echo trim($this->campaign->notes_campaign);?></textarea>

The same as before but without any white space between lines. This way is working perfect now.

Conclusion: it’s not the same and it works better without any space or indentation. Keep in mind when mixing HTML and PHP

Blogged with the Flock Browser
Comparte esto con tus amigos:

Deja una Respuesta