Structs data type in php?

后端 未结 7 1481
悲哀的现实
悲哀的现实 2020-12-07 17:47

Can anyone give me example for structs data type in php ? How come there is something like structs in php all of a sudden ?

7条回答
  •  广开言路
    2020-12-07 18:13

    I recommend 2 things. First is associative array.

    $person = Array();
    $person['name'] = "Joe";
    $person['age'] = 22;
    

    Second is classes.

    Detailed documentation here: http://php.net/manual/en/language.oop5.php

提交回复
热议问题