Jump to content

How to list this string?


lopes_andre

Recommended Posts

Hi,

 

I have one string with $string = '1,2,3,4,5,6,7';

 

I need to show this in a RSS feed like:

 

<category><![CDATA[1]]></category>

<category><![CDATA[2]]></category>

<category><![CDATA[3]]></category>

<category><![CDATA[4]]></category>

<category><![CDATA[5]]></category>

<category><![CDATA[6]]></category>

<category><![CDATA[7]]></category>

 

How can I do this? Using implode or explode?

 

Best Regards,

 

Link to comment
https://forums.phpfreaks.com/topic/191099-how-to-list-this-string/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.