<?php function englishSubstr($str,$start,$end) { if($start!=0) { if(substr($str,$start-1,1)!=" ")//如果被截的字母前面一个不是空格,表格这个字母并不是一个单词的开始 { //那么我们就去除第一个不完整单词 $i; for($i=1;$i<20;$i++) { if(substr($str,$start+$i,1)==" ") //向下循环,直到空格为止,然后高空格后的第一个字母为分页的第一个单词的开始 { break; } } $start+=$i; } } if(substr($str,$end,1)!="")//如果结束处不是空格,表示一个单词还没有完 { $i; for($i=1;$i<20;$i++)//往下循环,直到找到空格后退出, { if(substr($str,$start+$end+$i,1)==" ") { break; } } $end+=$i; } //获取分断单词 return substr($str,$start,$end); } // phper地带 http://www.phperzone.cn/portal.php?mod=view&aid=647
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article
Assassin's Creed Shadows: Seashell Riddle Solution
3 weeks agoByDDD
What's New in Windows 11 KB5054979 & How to Fix Update Issues
2 weeks agoByDDD
Where to find the Crane Control Keycard in Atomfall
3 weeks agoByDDD
Saving in R.E.P.O. Explained (And Save Files)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Dreamweaver Mac version
Visual web development tools

WebStorm Mac version
Useful JavaScript development tools

Zend Studio 13.0.1
Powerful PHP integrated development environment