2
do you have any way to change the seperators in your string? If i'm reading it right your sting is built like this.
# name ## url # description
if you use the explode function in php
$myarray = explode('#', $string );
You should get an array with each element as an item, and a blank item between 'name' and 'url'.
You could then loop through this array to build your sql making sure to skip the blank value. My looping isn't the greatest other wise I would attempt an example.
Ideally if you can define the seperators in your string, use a different seperator between each 'row' and another one between each field. Then you could do.
// assuming each row was seperated by #
$myarray = explode('#', $string );
// assuming each field was seperated by ;
foreach ( $myarray as $k=>$row )
{
$myarray[$k] => explode(';', $row);
}
that would give you the array with an array for each record.