[ create a new paste ] login | about

Link: http://codepad.org/Uvg6hT8P    [ raw code | output | fork ]

PHP, pasted on Sep 12:
// POST AN ARTICLE notification write
$result = mysql_query("
CALL AddNotificationOnPosts(".$UserId.",".$LastId.",".$LastGroupId.");
");
$ArrayIncrement = 0;
while($row = mysql_fetch_assoc($result))
{
	// Now update each notifications.xml for every user that need this
	$ArrayUserIdToUpdate[$ArrayIncrement] = $row['user_id'];
	$ArrayMessagesCount[$ArrayIncrement] = $row['messages'];
	$ArrayNotificationCount[$ArrayIncrement] = $row['notifications'];
	$ArrayTasksCount[$ArrayIncrement] =  $row['tasks'];
	$ArrayTotalCount[$ArrayIncrement] = $row['total'];
	
	$ArrayIncrement++;
}

/* WRITEING THE XML */
foreach($ArrayUserIdToUpdate as $Key=>$UserIdToUpdate)
{
	echo $UserIdToUpdate."-<br/>";
	echo $ArrayMessagesCount[$Key]."-<br/>";
	echo $ArrayNotificationCount[$Key]."-<br/>";
	echo $ArrayTasksCount[$Key]."-<br/>";
	echo $ArrayTotalCount[$Key]."-<br/><br/>";
	file_put_contents('../xdata/xml/notifications/'.$UserIdToUpdate.'.xml','<?xml version="1.0"?><data><page messages="'.$ArrayMessagesCount[$Key].'" notifications="'.$ArrayNotificationCount[$Key].'" tasks="'.$ArrayTasksCount[$Key].'" total="'.$ArrayTotalCount[$Key].'"/></data>');
}


Output:
1
2

Parse error: syntax error, unexpected T_STRING on line 26


Create a new paste based on this one


Comments: