douzhu7507 2016-07-25 02:44
浏览 155

如何从输入类型中删除Number之后显示的不必要的空格

I've got a problem while trying to edit a database record via PHP. Here it is the code of input type :

Employee Code : <input type=\"text\" name=\"empl_kode\" value=\"$edit->EMPL_KODE\">

After i successfully adding and showing new record, I've got a problem while editing it. In Employee Code text box, after the Number, there is long unnecessary white space.

Example :

enter image description here

How do i remove that unnecessary white space? Should i use trim function?

  • 写回答

2条回答 默认 最新

  • drrqwokuz71031449 2016-07-25 02:47
    关注

    use trim() from the manual.

    trim — Strip whitespace (or other characters) from the beginning and end of a string

    trim($edit->EMPL_KODE)
    

    plus you should find how it got in the variable in the first place.

    评论

报告相同问题?

悬赏问题

  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)