In pascal and delphi I am able to set up a custom type such as
myrecord = type
name : string;
number: integer;
end;
The advantage of this I can then do an array of that type so I can run code like records[i].name = … ECT. Can I do this in PHP?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You cannot create custom type, but you can use objects to hold information about your records. You can push objects into array afterwards and do exactly what you described.