While loop help
Posted: Thu Jan 17, 2008 12:37 am
I am trying to create a while loop that at the end of the loop it will exclude a , at the end of loop... code looks like this
at the end of the loop I dont want the "," after the ] how do I go about doing this?
Code: Select all
while($data = $DB->Fetch($query)) {
if(ereg($local,$data["location"])) {
$str .= "['".$data["location"]."','".$data["array"]."','".$data["model"]."'],";
}
}
echo $str;
}