Write a PHP program to create a new string using two given strings s1, s2, the format of the new string will be s1s2s2s1

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

Write a PHP program to create a new string using two given strings s1, s2, the format of the new string will be s1s2s2s1

الأجوبة

<?php
function test($s1, $s2)
{
    return $s1 . $s2 . $s2 . $s1;
}

echo test("Hi", "Hello")."\n";
echo test("whats", "app");

Sample Output:

HiHelloHelloHi
whatsappappwhats
هل كان المحتوى مفيد؟

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

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