“PHP Str_replace Multiple” Kode Jawaban

PHP Str_replace Multiple

str_replace(array(':', '\\', '/', '*'), ' ', $string);
Vadim

Ganti beberapa karakter satu string php

// Provides: You should eat pizza, beer, and ice cream every day
$phrase  = "You should eat fruits, vegetables, and fiber every day.";
$healthy = ["fruits", "vegetables", "fiber"];
$yummy   = ["pizza", "beer", "ice cream"];

$newPhrase = str_replace($healthy, $yummy, $phrase);
Clever Corncrake

PHP Str_replace Multiple

print str_replace(
    array("search1","search2"),
    array("replace1", "replace2"),
    "search1 search2"
);
Vadim

Jawaban yang mirip dengan “PHP Str_replace Multiple”

Pertanyaan yang mirip dengan “PHP Str_replace Multiple”

Lebih banyak jawaban terkait untuk “PHP Str_replace Multiple” di PHP

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya