Write a PHP program to create a new string of the first half of a given string of even length
- برمجة بي اتش بي
- 2021-09-08
- mhanasmh00489829403
الأجوبة
<?php
function test($s1)
{
return substr($s1, 0, strlen($s1) / 2);
}
echo test("Hello")."\n";
echo test("Hi")."\n";
Sample Output:
He H
أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال