Question
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: Option C
Was this answer helpful ?
The (array) is a cast operator which is used for converting values from other data types to array.
Was this answer helpful ?
Submit Solution