¿Qué formato es este?

This is simple, but I don't know what to search to find my answer. Can someone please tell me in what format this data was inserted in the table ?

I want to read/insert/update it using PHP.

image http://img841.imageshack.us/img841/4835/screenshot2011110813502.png

Aquí está el texto:

a:22:{s:12:"productimage";s:82:"/wp-content/uploads/products_img/bla.jpg";s:13:"productimage1";s:0:"";s:13:"productimage2";s:0:"";s:13:"productimage3";s:0:"";s:13:"productimage4";s:0:"";s:13:"productimage5";s:0:"";s:13:"productimage6";s:0:"";s:5:"price";s:2:"12";s:12:"spPrdLstDate";s:10:"2011-11-10";s:12:"specialprice";s:2:"11";s:6:"weight";s:1:"2";s:9:"istaxable";s:0:"";s:4:"size";s:5:"15,16";s:5:"color";s:3:"roz";s:10:"size_stock";s:4:",2,3";s:11:"color_stock";s:2:",1";s:19:"is_check_outofstock";s:2:"on";s:9:"initstock";s:2:"11";s:8:"minstock";s:1:"0";s:11:"isshowstock";s:2:"on";s:14:"affiliate_link";s:0:"";s:8:"posttype";s:7:"product";}

preguntado el 08 de noviembre de 11 a las 11:11

3 Respuestas

This is an serialized array, you can unserializar it to convert it back to the array type, and then serializar it back to string.

There is obviously a lot of debate on this being json or serialized data, but the length indicators for the upcoming string next to : clearly indicate a serialization.

$aArray = unserialize($sContents);
$sContents = serialize($aArray);

respondido 08 nov., 11:16

Yeah, it didn't look like json. I learned something new today. Thank you! - Mihai Chiriac

It's a serialized array you can deserialize it with http://www.php.net/manual/de/function.unserialize.php

respondido 08 nov., 11:16

respondido 08 nov., 11:16

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.