Here's my situation...I am taking an online PHP course. I thought knew alot about computers but it turns out that I don't! Our latest assignment is the one that stumped me. Here is what is being ask:
" Create a class Company on your web page. Create global variables and functions and place them into this class.
In addition to your existing variables, add the following properties to your class:
$company_url which will hold the web address of your web page. In this case it will be http://www.college1.com/users/plrondou@yahoo.com
$company_email which will be set to your email address plrondou@yahoo.com
At this point we have written quite a bit of code. It is important to develop your code in a consistent and organized manner. Use comments and blank lines to separate each lab. Here is one possible way to keep your code organized. I have laid out the basic code for this assignment, you still need to complete the code:
// ---------------------------------- lab 7 --------------------------------
print "<h2>Lab 7 Assignment</h2>";
class Company {
// copy and paste global variables
// copy and paste functions
} // end class company
// build Company object
$companyobject = new Company();
// call methods using the company object
print "<hr />";
// ---------------------------------- lab 6 --------------------------------
BE SURE TO USE THE OBJECTS PROPERTIES IN ALL YOUR METHODS. Inside the class you will access the variables using $this and outside the class you will use $companyobject. For example, to access the $company_url variable inside the class use $this->company_url, outside of the class you would use $companyobject->company_url. Same for methods, inside the class call them using $this and outside of the class use $companyobject. Inside the class you will need to change some of the code in the methods/functions to account for this difference.
Finally, and most important build after building a Company object beneath the "Lab 7Assignment" headline call and/or print the getHeader(), create_array_cars/houses/vacations, displayProduct() and getFooter() methods in that order. USE THE OBJECT TO CALL THE METHODS."
Here are the variable I have thus far:
global $vacation_array;
$vacation_array = array();
$vacation_array1[] = array( "54321", "Maui Magic in Hawaii", "1999.00", "Best beaches, best snorkeling" );
$vacation_array2[] = array( "87654", "Cruise in Style", "4500.00", "Luxury ship, ocean view with balcony." );
$vacation_array3[] = array( "09876", "London and Paris", "3999.00", "I see London, I see France" );
$vacation_array4[] = array( "32198", "Ski Aspen", "1500.00", "Swoosh, Swish, cut an edge in Aspen" );
$company_name = "Paige Vacations";
$company_address = "522 Broadway, Santa Cruz, California, 91234";
$mycolor="purple";
$company_url=http://www.college1.com/users/plrondou@yahoo.com;
$company_email=plrondou@yahoo.com;
I really need help creating this. Any advice would be great. Thanks