For some reason the item \"description\" returns NULL with the following code:
AHHH!!! This looks so wrong it hurts my head. Try something more like this...
mysql_num_rows you should use < not <=. You should also cache this value (save it to a variable) instead of having it re-count every loop. Who knows what it's doing under the hood... (might be efficient, I'm not really sure)mysql_fetch_array returns the values both by key and by int. You not using the indices, so don't fetch em.If this really is a problem with json_encode, then might I suggest replacing the body of the loop with something like
$rows[] = array_map('htmlentities',$row);
Perhpas there are some special chars in there that are mucking things up...