Home > Backend Development > PHP Tutorial > strrchr intercepts spaces

strrchr intercepts spaces

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2023-03-01 20:08:01
Original
1360 people have browsed it

As in the title:

<code>echo strrchr('123.jpg','.').'<br/>';
echo strrchr('123 jpg',' ').'<br/>';
</code>
Copy after login
Copy after login

Result:
.jpg
jpg
Why does the result contain no spaces when intercepting spaces? Is it taken by default?

Reply content:

As in the title:

<code>echo strrchr('123.jpg','.').'<br/>';
echo strrchr('123 jpg',' ').'<br/>';
</code>
Copy after login
Copy after login

Result:
.jpg
jpg
Why does the result contain no spaces when intercepting spaces? Is it taken by default?

The questioner, this pot strrchr is not memorized, you are outputting it in the browser, and it was eaten by your browser. Please echo str_replace(' ','&nbsp',strrchr('123 jpg',' ').'<br/>'); to view, or output the viewing results in the form of CLI, the spaces are There is output.
strrchr intercepts spaces
strrchr intercepts spaces

var_dump(); is a good function.

var_dump(strrchr('123 jpg',' '));

Related labels:
php
Statement of this Website
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template