Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8949959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:20:27+00:00 2026-06-15T13:20:27+00:00

I have a form that allows you to input phone numbers. You can click

  • 0

I have a form that allows you to input phone numbers. You can click a plus button and add more fields. I need to store all those values in the database but only have one column to do it.

With the phone number is also a type dropdown where you can select things like: Mobile, Home, and Work. So I need a way to pair the type and number together for each field, then combined all the pairs together. Then later on when I need the information, to be able to pull it all out and place all values into an array. Almost like encrypting and decrypting.

I was thinking of something like:

type:number;type:number;type:number;type:number;type:number;type:number

Being able to use explode and implode to encrypt and decrypt.

But how good is this? And I also have a search feature which searches for phone numbers. I imagine my way can’t be easy for a search function to look through.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T13:20:28+00:00Added an answer on June 15, 2026 at 1:20 pm

    I would say its a bad idea. If you planning to have limited types of numbers ie Home, Work, Mobile etcetera I suggest you to add columns for each number. Otherwise make a separate database table “phone_numbers” and relate this to your customer id or similar and add as many numbers you like. Searching will just be both faster and more easy to implement.

    If you still need to store them in a single field then use php implode() and explode() as you suggest. In my cases where I do this I would use a character that my customers would rarely think of such as a pipe symbol “|” as a delimiter. Of course I need to use str_replace or such technique to filter out if my users accidentally has used it in the input but best if its a character seldom used.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form that allows the user to add more form fields if
I have a bound form in microsoft access that allows a user to add
I have a dynamic form that allow to add many fields dynamically, I Know
I have a form that allows the user to add as many upload forms
Hi I have a simple form that allows a user to input a name,
I have a typical ADO.NET EF-driven form that allows the user to input a
I have a form that allows a user to add an unlimited number of
I have an add form that allows me to add the specific field into
I have a form that allows me with <input type=file name=filename accept=image/gif, image/jpeg, image/png>
I have a form that allows for a set of form fields to be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.