I am new in programming and want help. I want to save 2 variable's value in 4 tags and that group of tags will print as many times as user want in .xml file. how can i do this ? Is there any loop or recursion function ?
my code is this:
$variable1='abc';
$variable2='xyz';
$xml->channel->item = "";
$xml->channel->item->addChild('title', $variable1);
$xml->channel->item->addChild('link', $variable2);
$xml->channel->item->addChild('description', $variable1);
out put is this :
<item>
<title>4</title>
<link>4</link>
<description>4</description>
</item>
I want to print this item tag with its sub tags as many time as user want.