Ant*_*llo 1 php drupal drupal-computed-field
是否有PHP函数将通用多维数组编码为字符串并将其作为多维数组返回?
我需要它在mysql中存储一些数据(精确的drupal计算字段).该数组只包含浮点数和字符串.
serialize()并unserialize()做你所描述的.
http://www.php.net/manual/en/function.serialize.php
http://www.php.net/manual/en/function.unserialize.php
您还可以考虑使用json_encode()和将数组编码为JSON json_decode(),如果这对您很重要,则会提供更可读的输出.