hello
how are you all?
after i started to write few codes, i found that if i put the functions in files and call them fsomething.php my codes will not work very well
if no classes then many files to include and when trying to change something or edit something i have to open many files if for example changing name of variable that will be used in many functions
so i am now learning about classes
basic things i know is how to write the functions , and now learned how to put them inside the class
please let me know if i am wrong
1- name the class
2- define variables with VAR
3- write functions inside the class
4- not sure
5- not so clear
6- cry "i need help"; :-(
class audaysclass {
var thegetdata;
var thepostdata;
var somethingelse;
function checkget {
// a function to check get, not sure how i check the above data
if(is_numeric($thegetdfata)) {
echo $thegetdata;
} // closing if is_numeric($thegetdfata)
} // closing function checkget
} // closing the class
now in another file , if i include the class which one is the best method to use it , what is that "::" way
i want my index.php to use this class to check if GET data is numric only , like topic id for example
now i can do this after the include ?
$strangething = new audaysclass; // what is this for ... and why sometimes using extend
// now i dont know what is going on ... what to use ... this-> or what
// how can i use that function checkget which is inside the class above
// classes complicated but usefull ... i try to learn
so it seems i need a class for classes , or a big tutorial not just php manual
could you please explain to me the way classes work, please do not redirect me to website , i want to learn from u the easy steps not many ways , jsut the best and easiest way
thank you