rendered paste body<?class mostraEmenta { var $ShostName = "localhost"; var $SuserName = "root"; var $SuserPassword = ""; var $SdatabaseName = "restaurante"; function dbconnect(){ $Rcon = mysql_connect($this->ShostName, $this->SuserName, $this->SuserPassword) or die(mysql_errno() .": ". mysql_errror()); mysql_select_db($this->SdatabaseName, $Rcon); return $Rcon; } function apanhaInfo($Rcon, $tipo) { $Squery = "SELECT id_produto, nome, preco, foto, descricao FROM ementa WHERE tipo LIKE '". $tipo ."'"; $Rresultado = mysql_query($Squery, $Rcon) or die(mysql_error()); while($ASdata = mysql_fetch_array($Rresultado, $Rcon)){ $this->printOutInfo($ASdata); } } function printOutInfo($ASinfo){ for($i=0;$i<count($ASinfo);$i++){ echo $ASinfo[$i] ." | "; } } }?>