douniuta4783 2018-10-24 10:25
浏览 25

如何使用php从textarea中删除

I am not able to remove these " " from textarea using any of below method

Good job overall!

*********************************************************************** 

Soft skills: Please don\'t forget to ask customers for the reason of cancellation.

enter image description here

methods 
$resolution = trim($resolution);

//Effort 2
$resolution = nl2br($resolution);

//Effort 3
$resolution = htmlentities($resolution);

//Effort 4
$resolution = preg_replace("\\
","<br>",$resolution);

$snip = str_replace("\t", '', $snip); // remove tabs
$snip = str_replace("
", '', $snip); // remove new lines
$snip = str_replace("", '', $snip); // remove carriage returns

Array

( [0] => Array ( [field_id] => 5497 [type] => F [parent_id] => 0 [field_type] => selectbox [field_name] => Retention Offered? [required] => 1 [maxlength] => 0 [field_value] => YES [not_applicable] => on )

[1] => Array
    (
        [field_id] => 5494
        [type] => F
        [parent_id] => 0
        [field_type] => textarea
        [field_name] => Summary of Interaction
        [required] => 1
        [maxlength] => 0
        [field_value] => Cx requested cancel, agent secured and explained account, offered rates, cx declined, agent confirmed cancellation
        [not_applicable] => on
    )

[2] => Array
    (
        [field_id] => 5495
        [type] => F
        [parent_id] => 0
        [field_type] => textarea
        [field_name] => Feedback
        [required] => 0
        [maxlength] => 0
        [field_value] => Good job overall!

*********************************************************************** 

Soft skills: Please don\'t forget to ask customers for the reason of cancellation.
        [not_applicable] => on
    )

)

  • 写回答

2条回答 默认 最新

  • dougang5993 2018-10-24 10:29
    关注

    user preg_replace, To remove from a string, follow the below code

    $title = "Good job overall!
    
    *********************************************************************** 
    
    Soft skills: Please don't forget to ask customers for the reason of cancellation";
    $new_title = preg_replace("/[
    ]/","",$title); 
    echo $new_title;
    

    DOME

    评论

报告相同问题?

悬赏问题

  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 用hfss做微带贴片阵列天线的时候分析设置有问题
  • ¥50 我撰写的python爬虫爬不了 要爬的网址有反爬机制
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥120 计算机网络的新校区组网设计
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 海浪数据 南海地区海况数据,波浪数据