dongyuan2652 2014-01-17 20:09
浏览 32

Textarea没有空间写的空间

I have a texterea, i wrote "1" without space.

My goal : I want to show the value of $data['CMD_COM_LIV'] if

The problem : You can see this picture i have a little space between the beginning of the texterea and "1".

I tried to use n12br and i got the same result.

In PHPMYADMIN, CMD_COM_LIV is in UT8_general_ci, NULL and text and the value doesn't have any space...

It's only when i want to show the result in the texterea.

Thanks.

enter image description here

<div style="margin-top:15px;">
  <label>Commande :</label><br />
  <textarea rows="5" cols="60" name="com_cmd">
  <?php if(!empty($data['CMD_COM_COM'])) { echo nl2br($data['CMD_COM_COM']);} ?></textarea>
  <div class="clear"></div><br />

  <label>Livraison :</label><br />
  <textarea rows="5" cols="60" name="com_liv">
  <?php if(!empty($data['CMD_COM_LIV'])) { echo $data['CMD_COM_LIV']; }?></textarea>
  <div class="clear"></div><br />

  <label>Facturation :</label><br />
  <textarea rows="5" cols="60" name="com_fact">
  <?php if(!empty($data['CMD_COM_FACT'])) { echo $data['CMD_COM_FACT']; }?></textarea>
</div>
  • 写回答

2条回答 默认 最新

  • dongyuan8312 2014-01-17 20:12
    关注

    Any white space between the tags which is NOT inside php tags, remains white space in the resulting html output.

    Remove any whitespace/newlines between your textarea tags, and it will stop outputting the space

    评论

报告相同问题?

悬赏问题

  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本