Home > Article > Backend Development > How to define structure in php
Three ways to define a structure in PHP
1. The first way
struct Student { int age; float score; char sex; };
2. The second way
struct Student { int age; float score; char sex; }st;
3. The third way
struct { int age; float score; char sex; }st;
Recommended tutorial: PHP video tutorial
The above is the detailed content of How to define structure in php. For more information, please follow other related articles on the PHP Chinese website!