تنويه هنا عند الإجابة على كل سؤال قم بنسخ الكود وقم بتجربة ما إذا كان صحيح والرجو الإجابة قبل التجربة كل ماترتفع في الأسئلة تزيد درجة الصعوبة المهم لا تفشل إذا لم تجب بالشكل الصحيح حاول قراءت الكود أكثر من مرة ومحاولة فهمه و وفقك الله.


<?php
    $alphabet = "abcdefghijklmnopqrstuvwxyz";
    $text = "";

    for ($i = 0; $i < 10; $i++) {
        $random_letter = $alphabet[rand(0, 25)];
        $text .= $random_letter;
    }

    echo "The random text is: " . $text;
?>
  • A)The random text is: aaaaaaaa
  • B)The random text is: abcdefghijklmnopqrstuvwxyz
  • C)The random text is: zyxwvutsrq
  • D)The random text is: 1234567890

<?php
    $array = array(1, 2, 3, 4, 5);
    $sum = 0;
    $count= count($array);

    foreach ($array as $value) {
        $sum += $value;
    }

    $average = $sum / $count;

    echo "The average of the array is: " . $average;
?>
  • A)The average of the array is: 3
  • B)The average of the array is: 4
  • C)The average of the array is: 5
  • D)The average of the array is: 2

<?php
    echo "Hello World";
?>
  • A)"Hello Hello"
  • B)World Hello
  • C)Hello World
  • D)Error

<?php
    echo "Hello World";
?>
php
$images= array("image1.jpg", "image2.jpg", "image3.jpg");
$random_image = $images[array_rand($images)];
?>

<img src="" alt="Random Image">
  • A)يتم عرض صورة "image1.jpg"
  • B)لا يتم عرض أي صورة
  • C)يتم عرض النص "Random Image"
  • D)يتم عرض صورة عشوائية من الصور المذكورة في المصفوفة.