<?php
include '../comunes_php/cors.php';

       $tabla = $_REQUEST['tabla'];
	include '../rdb/conn.php';

	$rs = mysqli_query( $conn,"select * from $tabla order by 2");
	$rows = array();
	while($row = mysqli_fetch_assoc($rs)){
	    $rows[] = $row;
}
	echo json_encode($rows);
?>