ExpertRefresh

Variables / Array to object  

Related Pages

Definition
Variable
Check
Type casting
Array to object
New object


0.0% 100%
 
 
0 pages 298 questions
1) Can you call an array item like object property?




2) What is the missing part? <?php $arr = array('senderId' => 10); .... echo $obj->senderId; // Outputs: 10







<?php $arr = array('senderId' => 10); $obj = (object) $arr; // --- Look Here --- // echo $obj->senderId; // Outputs: 10


References