Hey,
I probably didnt word the title as good/accurately as I could have but I dont know of anyother way so ill try an elaborate more. I am trying to make a loop that sorts out an array that contains 5 sets of data, each set is similar in makeup but contains different info.
Here is the code im currently using
//Assign ID's
if(ereg("<--StartId-->(.*)<--EndId-->", $Pieces[1], $Id))
{
$Id[1] = htmlspecialchars(strip_tags($Id[1]));
echo $Id[1];
}
else
{
return "Error : Could not find User Id!";
}
the $Pieces variable is the array containing the 5 sets of data, I am trying to run the above code thru a loop 5 times each time incrementing the array values by 1, I thought that this coude would do the trick but it didnt (to give you a better idea of what im talking about)
$Limit=5;
$i=1;
while($i < $Limit)
{
//Assign ID's
if(ereg("<--StartId-->(.*)<--EndId-->", $Pieces[$i], $Id))
{
$Id[$i] = htmlspecialchars(strip_tags($Id[$i]));
echo $Id[$i];
}
else
{
return "Error : Could not find User Id!";
}
$i++;
}
Hope that made it clearer, im very tired right now so I dunno how clear I was, but the above code doesnt work 'as it should', if anyone knows what im rambling about and would take the time to help me I really apprecaite your help, thanks in advance as I probably wont be replying for about 12 hours (tommorow is my first day off in 4 weeks and im sleepin in =) )