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 6611011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:54:55+00:00 2026-05-25T19:54:55+00:00

I have database results in the following format: s:6:hobbit the s is string and

  • 0

I have database results in the following format:

s:6:hobbit

the s is “string” and the value is the count of characters in the third section. What is this called? Colon separated values? Is the only way to deal with it, in PHP, through regex?

Specifically, I’m trying to get the value hobbit. But obviously when I access the db to get anything I get the whole value s:6:hobbit. Am I doomed to using regex to work with results like this?

  • 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-05-25T19:54:55+00:00Added an answer on May 25, 2026 at 7:54 pm

    Looks like the output from serialize(). (Hint: unserialize()*)

    Alternatively, you can explode() on : with limit=3. This is important as the string itself (everything from the second : forward) may contain colons.

    Also, why are these values in the DB in the first place?


    *) EDIT It seems that serialize() would have encoded the string as s:6:"hobbit" (quoted) so the explode() could prove to be the way to do this.

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

Sidebar

Related Questions

I have data in the following format in a sql server database table [CPOID]
I have a database with the following table: id value ----------- 1 yes 2
I have the following table in a SQLite3 database: CREATE TABLE overlap_results ( neighbors_of_annotation
I have a form that shows results from a database query, these results can
I have a view in my database that produces ordered results, but when I
I have a control that, upon postback, saves form results back to the database.
i have database table like this +-------+--------------+----------+ | id | ip | date |
Currently I have database with the following associations: One Client to Many Intakes One
I have a database/table in SQLITE using the following structure CREATE TABLE milestones (
I have the following in my SQL where clause. This is running against an

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.