我有一个细节数组:
[info_details] => Array
(
[0] => <b>title:</b> this is title
[1] => <b>name:</b> this is name
[2] => <b>created</b> this is date
)
我需要将这个数组格式化成这样:
[info_details] => Array
(
[title] => this is title
[name] => this is name
[created] => this is date
)
那么,如何使文本加粗呢? 我的代码如下:
foreach ( $array as $key => $value ) {
$this->__tmp_data['keep'][] = preg_split('/<b[^>]*>/', $value);
}
但它并没有起作用。