MemoryRefresh!

New object



Questions Answers 0%

Pages   0 from 51
Questions   0 from 84

Reset




<?php // create new object $obj = (object) array(); // OR $obj = new stdClass(); $obj->key1 = "value1"; $obj->key2 = "value2"; var_dump($obj); /* object(stdClass)[1] public 'key1' => string 'value1' (length=6) public 'key2' => string 'value2' (length=6) */
https://stackoverflow.com
Questions

Related pages

Definition !
Variable !
Check !
Type casting !
Array to object !
New object !


0% 100%
 
 
0 pages 51 pages
1) How to create new object?





Last Review: n/a   Passed: n/a   Reviews: n/a   Next Review: n/a  



<?php // create new object $obj = (object) array(); // OR $obj = new stdClass(); $obj->key1 = "value1"; $obj->key2 = "value2"; var_dump($obj); /* object(stdClass)[1] public 'key1' => string 'value1' (length=6) public 'key2' => string 'value2' (length=6) */
https://stackoverflow.com



More from Php

Basics
Variables
Operators
Function
Array
String
Streams
Uncategorized


More from Programming

Php
jQuery




Powered by minte9.com