Sooneofthevaluablethingswithanarrayisthatyoucanhave a variablewithmultiplevaluesinit.
Soyoucandothisforthingssuchascontaining a listofnamesofpeoplethatmaybeattendinganeventordoingsomethingsoyoucanhaveyourpeopleequalsBobandSueandMargeandTimandJohn, soonandsoforth.
Sothisisoneofthethingsthatmakes a raiseveryvaluableintherealworldforanykindofthingwhereyou'reprintingoutlistsordoingthattypeofthing, a raise, justmakelifereallysimple.
Sowiththat, let's gooverthecomputer, and I canshowyouhowtobothsosoreinalphabeticalorderandsoarinreversealphabeticalorder, anarray.
Sowehearwehave a simplePHPscriptthat I'vethat I'vetitledArraysortdotPHPAndagain, aswealwaysdo, weopenwiththePHPtag.
Thereactuallyis a littlebitmoretothis, but I thinkitmightget a littleconfusingforpeople, especiallyifyou'rewatchingthislevelofclass.
Soifyou'reinterestedmawrinsortingand a raise, I woulddefinitelysayyoushouldYoushouldlookitupanddosomeresearch, butthisgivesyouanoverrideallideaonhowtosortit.
Like, youknow, 80% ofwhatmostPHPscriptsdoistheycreatereportsasoneimportantthingthatyouhavetodowhenyoucreate a reportiscreating a reportthatmakessenseforpeopletobeabletoreadandlookatsosimplybybeingabletodosomethinglikesortingtheinformationalphabeticallythatjustmakesthatreportsomucheasiertoreadforwhoeverhastodealwithitinthebusinessenvironment, sosomethinglikesortingand a raveisoneofthosethingsinPHPthatseemsverysmall.