الفصل السادس
متنوعات
$trimmed
=
chop ($line);
echo $trimmed;
// Chr() example
$str = chr (27); /* add an escap, character at the end of $str */
/* Often this is more useful */
$str = sprintf ("The string ends i escape: %c", 27);
echo $str
// Chunk_split() example
# format $data using RFC 204: semantics $new_string = chunk_split (base64_encode($data));
echo "Hello World";
echo "This spans
multiple lines. The newline. will be
output as well";
echo "This spans\nmultiple lines. The newlines will be\noutput as well.";
// Explode() example
$pizza = "piece1 piece2 piece3 piece4 piece5 piece6";
$pieces = explode(" ", $pizza);
تقسيم النص بعلامة المسافة ، وبالتالي يصبح مصفوفة //
echo $pizza;
echo "<BR>". $pieces;
// htmlspecialchars() example
الحصول على نص متشعب بعلاماته //
$new = htmlspecialchars("<a href='test'>Test</a>", ENT_QUOTES);
echo $new;
Y.A
ص ٢٠٨