I'm trying to produce a script that when I query in mysql it returns an array, so far ok, but the goal is to have this query turn an edited json. Example:
{"changelog":{"count":2,"news":{"ola":"testando1","ola2":"testando2"}}}
And in C # I make a code that returns this and put it in a TextBox. But I do not know how to add an item to an array when it returns the data in array.
$array1 = array();
while( $row = mysql_fetch_array($query)){
// adiciona no array a $row[1] e $row[2] por exemplo: no lugar do 'ola' fica o $row[1] e no lugar do 'testando1' fica o $row[2]
}
however the query we will assume is 30 items the query is limited to LIMIT 0,10
TABLE:
CAMPO | VALOR ID | TIPO INT, NOT NULL, AUTO INCREMENT TITLE | TIPO TEXT, NOT NULL // $row[1] DESCRIPTION | TIPO LONGTEXT, NOT NULL // $row[2]
%pr_e%