我有这个来自数组转储的结构:
0 =>
object(stdClass)[3]
public 'start' => string '12:30:00' (length=8)
public 'end' => string '12:45:00' (length=8)
public 'structure' =>
object(stdClass)[5]
public 'structure_id' => int 5
public 'structure_name' => string 'LABORATORY 1' (length=18)
public 'specialist' =>
object(stdClass)[6]
public 'specialist_id' => int 222
public 'specialist_surname' => string 'Smith' (length=7)
public 'specialist_name' => string 'John' (length=9)
public 'specialist_signature' => string 'Dr.' (length=3)
public 'price' => float 80.5
1 =>
object(stdClass)[3]
public 'start' => string '12:30:00' (length=8)
public 'end' => string '12:45:00' (length=8)
public 'structure' =>
object(stdClass)[5]
public 'structure_id' => int 5
public 'structure_name' => string 'LABORATORY 4' (length=18)
public 'specialist' =>
object(stdClass)[6]
public 'specialist_id' => int 222
public 'specialist_surname' => string 'White' (length=7)
public 'specialist_name' => string 'Jack' (length=9)
public 'specialist_signature' => string 'Dr.' (length=3)
public 'price' => float 80.5
2 =>
object(stdClass)[3]
public 'start' => string '12:30:00' (length=8)
public 'end' => string '12:45:00' (length=8)
public 'structure' =>
object(stdClass)[5]
public 'structure_id' => int 5
public 'structure_name' => string 'LABORATORY 9' (length=18)
public 'specialist' =>
object(stdClass)[6]
public 'specialist_id' => int 222
public 'specialist_surname' => string 'Brown' (length=7)
public 'specialist_name' => string 'Lester' (length=9)
public 'specialist_signature' => string 'Dr.' (length=3)
public 'price' => float 80.5
如何用 PHP 解析它?特别是,我想为普通的 PHP 变量赋值,以便打印它们或放入 HTML 表中。