Skip to content

Latest commit

 

History

History
46 lines (30 loc) · 1.06 KB

File metadata and controls

46 lines (30 loc) · 1.06 KB

#Day 10!!! ##Ben

###Sorting Functions

sort(); - sorts array normally. rsort(); - sorts array in reverse. asort(); - sorts array and keeps indexes/keys with its values. ksort(); - sorts array by keys.

REMEMBER

If you call on the value of a sort it reurns a BOOLEAN!! You must sort and then store!!

###Searching Arrays

array_search($needle,$haystack) - searches through a haystack for a needle.

####Lunch

##Dirk Elmendorf Ability to learn and improve is the most valuable asset to pitch to employers. Media sources : RSS, hacker news, feedly.com, bit.ly/new2code, dzone like trucking management on fb

##Chris

Pushing, Popping, and Shifting!!

array_push($array, $new_element); - push one or more items onto the end of an array. array_pop($array); - pop the element off the end of an array. array_unshift($array, $new_element); - add an element to the beginning of an array. array_shift($array); - shift an element off the beginning of an array.

####Stack last in first out

push and pop!

####Que first in first out

push and shift!