My program
The code is as follows |
Copy Code |
echo $fileddata [' house_feature '];
if ($fileddata [' house_feature ']) { $fileddata [' house_feature '] = Implode (' | | | '), $fileddata [' house_feature ']); } echo '----'. $fileddata [' House_feature '] |
The result is: North-South Permeability | | At any time to see the room | | | Convenient Transportation--------
Then repeatedly check did not find out the reason, Baidu search for a while there is a netizen said implode (', ', $goods _attr) This writing is not scientific. should be judged. if ($goods _attr) clatter think, this implode is not only to convert the array into characters? Baidu Click the Mplode () function combines the array elements into a single string.
Parameters |
Description |
Separator |
Optional. Specify what is placed between array elements. The default is "" (empty string). |
Array |
Necessary. The array to combine as a string. |
There is no value behind it, then
The code is as follows |
Copy Code |
$fileddata [' house_feature '] = Str_replace (' | | | | ', ', ' $fileddata [' house_feature ']); |
Re-test North-South permeability | | At any time to see the room | | | Convenient transportation and north-south transparent, at any time to see the room, convenient transportation is the result I want.