ExamVeda
Login
Home
This question belongs to PHP Basic PHP
Basic PHP
?

What will be the output of the following PHP code?
<?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.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.