日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程语言 > php >内容正文

php

php分开每个字,PHP,分解每个句子之间有特殊字符的文本文件

發(fā)布時(shí)間:2025/3/20 php 44 豆豆
生活随笔 收集整理的這篇文章主要介紹了 php分开每个字,PHP,分解每个句子之间有特殊字符的文本文件 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

我有一個(gè)帶有Unicode編碼的文本文件(有時(shí)它包含一個(gè)希伯來(lái)語(yǔ)),其內(nèi)容是文本,在每個(gè)句子之間有一個(gè)像這樣的兩個(gè)特殊字符(■■)(alt + 2 + 5 + 4),這是一個(gè)示例

"How are you, It's a cool day .. how can I read this sentence in a string variable with the quotes."■■

"This is second sentence I want it in another variable or in second cell in array."■■

This is third sentence. It is without quotes I want to read it to a string.■■

This is fourth sentence it includes an enter,

The fourth sentence isn't completed right yet.

The sentence doesn't completed until the special character is appears,

Maybe there a lot of lines in the same sentence.

This is the last part of the sentence■■

"This is the fifth sentence", this is the second part of the fifth sentence■■

Maybe between every two sentences there is a lot of empty lines, This is the sixth sentence■■

Thanks I wish anyone can help me with this, This is the last sentence■■我對(duì)這個(gè)代碼,但它不起作用:

$file=file_get_contents("text_file.txt");

$file_= urldecode($file);

$sentences = explode('■■',$file_);

?>當(dāng)我為第一句(我沒(méi)有把所有文件放在簡(jiǎn)單的閱讀文件中)制定指定的代碼時(shí),我會(huì)得到

Array ( [0] => ��"How are you, It s a cool day .. how can I read this sentence in a string variable with the quotes."�%�%并獲得相同的其他句子..(我看到在同一行中的所有句子)我的意思是沒(méi)有進(jìn)入

另一件事,我想忽略兩句話之間的界限,我的意思是忽略■■后面的空行

總結(jié)

以上是生活随笔為你收集整理的php分开每个字,PHP,分解每个句子之间有特殊字符的文本文件的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。