Write a PHP script to remove part of a string

  • برمجة بي اتش بي

Write a PHP script to remove part of a string.

Original String : 'The quick brown fox jumps over the lazy dog'
Remove 'fox' from the above string.

Pictorial Presentation:

الأجوبة

<?php
$my_str = 'The quick brown fox jumps over the lazy dog';
echo str_replace("fox", " ", $my_str)."\n";
?>

Sample Output:

The quick brown   jumps over the lazy dog
هل كان المحتوى مفيد؟

تبحث عن مدرس اونلاين؟

محتاج مساعدة باختيار المدرس الافضل؟ تواصل مع فريقنا الان لمساعدتك بتأمين افضل مدرس
ماهو التخصص الذي تبحث عنه؟
اكتب هنا...