Help with something that should be basic to me... Exploding
Posted: Mon Feb 10, 2003 1:58 pm
I don't quite get it... I want to syndicate news on my site. Here's a example item...
I want it at least split up by date groups, but if possible by date[contest],[message]
here's my confuzzled code::
Please note that the above was created with getting the file in mind and changed for debugging ease... to me at least 
Code: Select all
Date Contest Comment
2003-2-3 6:29 pm Hallway Hunt callmeminyme enters FearMK1,
a UFO with a combination MG and Rocket attack.
FearMK1 ranks in at 3rd, hot on the heels of Assassin Major Mk2...
2003-2-1 3:54 pm Arena Combat Liebig enters Attila junior which ranks in at 25th.
BattleSkins2 updated with Attila junior's skin.
2003-2-1 3:38 pm Maze Burnin Pancake enters MazorEyeICE.
Like MazeMonkey, MazorEyeICE uses a combination of MazorBlade's left-right search
and MazeMonkey's dead end elimination.
The combination should make it the top, but it still needs a bit of tweaking and
unfortunately it also has a bug that crops
up in Maze 1, so it doesn't ever finish that maze, giving it an overall score of 141
which ties for 2nd with Frantic (which is still great performance!)here's my confuzzled code::
Code: Select all
<?
global $item1;
function file_to_array($item1, $itemurl, $seperator)
{
#$item['content1'] = @require($item_url);
//Add delimiters
$item1['content1'] = str_replace("2003", "|2003", $item1['conent1']);
$item1['content1'] .= $seperator;
//#if(($explode == true) and ($item['url'] != '') and (@require($item['url']) != ''))
$item1['array'] = explode($seperator, $item1['content1']);
}
$item1['content1'] = "2003-2-3 6:29 pm Hallway Hunt callmeminyme enters FearMK1, ";
$item1['content1'] .= "a UFO with a combination MG and Rocket attack.";
$item1['content1'] .= "FearMK1 ranks in at 3rd, hot on the heels of Assassin Major Mk2...";
$item1['content1'] .= "";
$item1['content1'] .= "2003-2-1 3:54 pm Arena Combat Liebig enters Attila junior which ranks in at 25th. ";
$item1['content1'] .= "BattleSkins2 updated with Attila junior's skin.";
$item1['content1'] .= "";
$item1['content1'] .= "2003-2-1 3:38 pm Maze Burnin Pancake enters MazorEyeICE. ";
$item1['content1'] .= "Like MazeMonkey, MazorEyeICE uses a combination of MazorBlade's left-right search ";
$item1['content1'] .= "and MazeMonkey's dead end elimination.";
$item1['content1'] .= "The combination should make it the top, but it still needs a bit of tweaking and ";
$item1['content1'] .= "unfortunately it also has a bug that crops ";
$item1['content1'] .= "up in Maze 1, so it doesn't ever finish that maze, giving it an overall score of 141 ";
$item1['content1'] .= "which ties for 2nd with Frantic (which is still great performance!)";
file_to_array($item1, "", "|");
print_r($item1['array']);
?>