xxxxxxxxxx
<?php
// 36. implode()
$array = array("apple", "banana", "cherry");
echo implode(", ", $array);
echo "\n";
// Output:
// apple, banana, cherry
// 37. chr()
echo chr(65);
echo "\n";
// Output:
// A
// 38. ord()
echo ord("A");
echo "\n";
// Output:
// 65
// 39. str_contains()
if (str_contains('Hello, world!', 'world')) {
echo "Found\n";
} else {
echo "Not found\n";
}
// Output:
// Found
// 40. str_starts_with()
if (str_starts_with('Hello, world!', 'Hello')) {
echo "Starts with Hello\n";
} else {
echo "Does not start with Hello\n";
}
// Output:
// Starts with Hello
?>