B
B
Boris Belov2015-11-02 15:43:25
PHP
Boris Belov, 2015-11-02 15:43:25

How to replace characters in URL?

Good afternoon.
How to replace characters from ",," to ".." in URL?
for example, the form:
site.rf / section,,
to
site.rf / section ..
Need to replace two commas with two dots? How to do it and where?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Optimus, 2015-11-02
Pyan @marrk2

$content = preg_replace("/,,/ism", "..", $content);

D
Dmitry, 2015-11-02
@mytmid

$url = str_replace(',,', '..', $url);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question