0

i have a problem. I want in php to replace all 'blablabla' with 'bla'(because i hate blablabla). Here's my code:

<?php
$string = 'Dracula always says BlaBlaBla but says he never says BlaBlaBla';
$result = answer to replace here
?>

Thanks

James Bob
  • 85
  • 1
  • 2
  • 10

2 Answers2

1

You can use something like this:

str_replace("BlaBlaBla","bla",$string)

Also you can find it here in the docs: http://php.net/manual/en/function.str-replace.php

Hespen
  • 1,384
  • 2
  • 17
  • 27
1

Use srt_replace function to do that like this :

str_replace("BlaBlaBla","bla",$string);
henrybbosa
  • 1,139
  • 13
  • 28