I have this...
<?php
$links = explode("\n", $_POST['links']);
foreach ($links as $links)
{
echo '[PART="NUM"]'.$links.'[/PART] <br />';
}
?>
Where it says NUM I want the number of its position in the array.
So if I fed this to this script:
http://www.google.com
http://www.yahoo.com
http://www.ask.com
The script would then output:
[PART="1"]http://www.google.com[/PART]
[PART="2"]http://www.yahoo.com[/PART]
[PART="3"]http://www.ask.com[/PART]
How would I go about doing this?