Jump to content

What kind of encoding is this?


shoover56

Recommended Posts

Good evening everyone. I am writing some custom code over a WP site and I noticed that a value I need to grab is encoded into a string from a mysql table such as this:

 

a:3:{s:13:"checkout_type";s:14:"create-listing";s:4:"plan";i:41;s:6:"addons";a:0:{}}

 

(The value i need to grab is the 41 in i:41)

 

I'm just wondering if this is a 'type' of encoding and that a singular built in php function can do. If not, then I can do it on my own, just don't want to waste time exploding and str_replacing till I get it if it actually is a standard for metadata.

 

Thank you kind gentlemen and lady developers

-Steve

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.