<?php
$link=mysqli_connect("localhost","*","*","*");
/*check connection*/
if(mysqli_connect_errno()){
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
$query="SELECT id_producto,titulo FROM producto";
$result = mysqli_query($link, $query);
/*associative array*/
$row=mysqli_fetch_array($result, MYSQLI_ASSOC);
printf("%s*(%s)\n",$row["id_producto"],$row["titulo"]);
/*free result set*/
mysqli_free_result($result);
/*close connection */
mysqli_close($link);
?>