PHP array
Posted by clifton on 24 May 2007 in Tasks
I had some difficulty yesterday with converting the JavaScript array to a PHP array. Not that I couldn't create an array but I was falling into some problems with converting the PHP into a literal string so that it could be saved to a file. I had to fragment the PHP array into several lines and then join them together as one string once the process was complete.
From here I was able to read the PHP array on the courses page. I was able it to style it in a similar way to the old website. I was also able to use JavaScript to hide all the course divs after they were printed (so that if a person doesn't have JavaScript enabled it will show all the course data).
Today I am going to attempt to complete the undergraduate course page by letting it only show undergraduate courses and also have the course information expand. Next I will attempt to port this code over to the graduate courses page so that after a bit of tweaking both courses pages will be complete.
From here I was able to read the PHP array on the courses page. I was able it to style it in a similar way to the old website. I was also able to use JavaScript to hide all the course divs after they were printed (so that if a person doesn't have JavaScript enabled it will show all the course data).
Today I am going to attempt to complete the undergraduate course page by letting it only show undergraduate courses and also have the course information expand. Next I will attempt to port this code over to the graduate courses page so that after a bit of tweaking both courses pages will be complete.