How to turn a simple php var value to an object?

This web-page may be of use:

or try the PHP Manual:

http://php.net/manual/en/language.types.object.php

Update:
Try this example and note the use of the useful function fred(…,) which formats the data:


function fred($data='THERE AIN\'T NOTHING SET', $title='')
{
  echo '<pre class="fll tal bdr p42" style="background-color:#efe; color:#900">';
    echo '<b>'.$title .'</b><br />';
      print_r($data); 
     // var_dump($data); // VERBOSE Output
  echo '</pre>';
  echo '<hr class="clb" /><hr />';
}

$x = array(0,1,2,5,9);
fred($x);
$xx = (object) $x;
fred($xx);

Output:


Array
(
    [0] => 0
    [1] => 1
    [2] => 2
    [3] => 5
    [4] => 9
)

stdClass Object
(
    [0] => 0
    [1] => 1
    [2] => 2
    [3] => 5
    [4] => 9
)