N
N
Name2021-06-26 10:30:47
PHP
Name, 2021-06-26 10:30:47

How to make several changes in the text at once?

There is a text in the variable: you need to replace qwe with asd and 567 with 345. Is it possible to make two replacements in one call to the variable q? Or is each replacement necessarily a new access to the variable?
$q = 'qwe 123 rty 567 uio';


Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lillipup, 2021-06-26
@User782

You can do this
https://www.php.net/manual/en/function.strtr.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question