Searching Numbers in Array
Moderator: General Moderators
Searching Numbers in Array
For my website, http://www.gofanboy.com , I am working on allowing the user to view all bids they have placed under a section called "my posts". I do this by storing the id of the item the user bid on under the users current bid field. The current bid field consists of numbers seperated by spaces ex(63 21 76). I need to know the best way after exploding the string to search for each item id seperately. Any thoughts would be appreciated.
Code: Select all
foreach($itemID AS $item){
if(in_array($item,$yourExlplodedArray)){
// item is in array, so do what you wish with it
}
}Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.