I am a beginner in php. I want to call a class within the same php file but when i am trying the class itself is not recognized. What i am doing wrong. please guide me through the right direction since i just started writing code in php.
Code:
<?php
$details = new studdetails();
$details->id = $sid;
$details->name = $sname;
$details->roll = $sroll;
Somemethod("Have some calculations over here");
Class studdetails{
public id;
public name;
public roll;
}
?>