My array is like:
Array ( [show_to_mentees] => 1 [show_profile] => 1 [job_title] => title [mentor_org] => orgnization [mentor_gradyear] => 2010 [mentor_sector] => Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 ) [mentor_interest] => Array ( [0] => 2 [1] => 4 ) [mentor_degree] => 14 [career_summary] => summary )
I have to insert the bold array values into a MySQL database, and that should be easily searchable.
Either I should insert a new row for each index or create a string of index values and save it in a single row.
I assume that the information in the array is about the 'mentor' itself and the key 'mentor_interest' show the interest of mentor in different sectors.
If above statement is right then, I assume/suggest that you have 'sectors' table in the database.
I would recommend separate tables mentor_sectors and mentor_interests. Also you would need to add each value separately with the mentor_id in another column for linking purpose.