I’m confused about what the word “object” does in PHP for example:
while($row = mysql_fetch_object($result)) {
$images[] = (object) $row;
}
What does “(object)” do? I’ve seen it occur multiple times and do not know it’s purpose nor what it does, any explanation would be greatly appreciated, thank you!
It is used to place a variable inside an object in PHP.
You’re using semi-deprecated functions btw, be careful with your useage, such as
mysql_fetch_oject().