Inglebard
Inglebard

Reputation: 437

What is the name of this structured string?

In mysql I can see a lot of these structured strings (it's like json but not really):

a:2:{s:5:"hello";s:0:"";s:7:"World !";s:0:"";}

Does it have a special name?

It is possible to recalculate automatically the length of strings (after search and replace)?

Upvotes: 2

Views: 150

Answers (1)

Liam Wiltshire
Liam Wiltshire

Reputation: 1264

This is a serialized string in PHP - check out the serialize() and unserialize() functions in the documentation:

http://php.net/manual/en/function.serialize.php

You can't really edit them inline (at least I wouldn't recommend it) - your best bet would be to userialize(), make the change to the array, and then re-serialize() the array.

Upvotes: 4

Related Questions