?
What will be the output of the following PHP code?
What will be the output of the following PHP code?
<?php
$score = 1234;
$scoreboard = (array) $score;
echo $scoreboard[0];
?>
<?php
$score = 1234;
$scoreboard = (array) $score;
echo $scoreboard[0];
?>
Answer & Solution
Correct Answer:
Option
C
The (array) is a cast operator which is used for converting values from other data types to array.
Join the Discussion
Login to post a comment or share your explanation.
Login