How to add a character space after PHP's tag function
P粉092778585
P粉092778585 2023-09-08 09:53:12
0
1
546

I am using this code

<span class="tab-text-subheader">
    <? echo ($rrow['tags']) ? $rrow['tags'] : "-"; ?>
</span>

Extract tags and list them, currently it displays as follows

Tags: tag1,tag2,tag3,tag4

But I want a space after the comma, like

Tags: tag1, tag2, tag3, tag4

I've tried a few different solutions, but I'm not a coding expert. Thanks

P粉092778585
P粉092778585

reply all(1)
P粉277824378

Just use string replace function and replace , with , (comma with space)

<span class="tab-text-subheader"><? echo ($rrow['tags']) ? str_replace(',', ' ', $rrow['tags ']); : "-"; ?></span>

I hope this is useful to you

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template