jlk;j
what u posted looks ok, and if i understood u right u have creaded this class.
so where is ur prob.
we’d realy like to help, but i have no idea what u are expecting us to tell u? what u have written looks good to me.
im supposed to do what it says up there. i cant figure out how you make a table with all the above to show up… but then you can have only certain ones show up like comm
could u post the relavent code u already have?
i just don’t know where to start. what do u have alredy?
do u have the class working?
do u have the array containing objects?
i have the table with all the information
but i dont know how to do the part that says
**Produce a function, showClass, which will take in an argument, $prefix, and produce a class list that matches the class prefix supplied by $prefix. For example, when you call the function showClass(‘CTEC’), only CTEC classes will be listed.
and
**To demonstrate the functionality of your script, call the showClass function with the argument set to $_GET[‘prefix’] at the end of your script.
j;lk
sry i coudn’t reply earlyer. hope it’s not to late. u havn’t said when it has to be finished.
try to build the function as explained in
http://php.net/function
in there u need to access the array
http://php.net/globals
then u need a foreach loop loopin throu the first-dimention.
http://php.net/foreach
and inside the foreach loop u need to compare $var[‘Course’] with $prefix.
http://php.net/strlen
http://php.net/substr
and then just echo the info out
http://php.net/echo
oh its due tomorrow…
okay i started working on it some more… this is what i have…
i still dont know what to fill in the blanks with… could you help me
COMM 2350 | Intro to Comm Tech | FAB 412 | |
COMM3350 | Website Communication | FAB 411 | |
BCMN 3319 | Broadcast Managemen | FAB 327 | |
BCMN 3340 | Electronic News | FAB 112 | |
ADVT 3305 | Advertising Media | FAB 409 |
- ";
foreach($classList as $item) {
echo "
- ".$item. "
"; } echo "
// go through course list
foreach ( ) {
??
// for each course, find out if its _____ course
if(0==$x) {
// yes, print it out
??
// no,ignore
???
//to test
<?php function showClass($X) { } showClass('CTEC'); showClass($_GET['prefix']); //end ?>the foreach looks good but echo out $item[‘Course’] a.s.o.
and put it inside the function as u have to.