- print_r: documentation ( source)
<?php
class foo
{
public $values;
public function __construct(array $values)
{
$this->values = $values;
}
}
$string = '\'\\\'test\\\'\',\'\\\'te\$t2\\\'\',\'\"test3\"\'';
$array = eval("[" . $string . "];");
print_r($array);