<?php
$host = "localhost";
$name = "имя";
$password = "пароль";
$db = "база";
@mysql_connect($host,$name,$password) or die(mysql_error());
@mysql_select_db($db) or die(mysql_error());
$sql=mysql_query("SELECT * FROM portfolio;");
while($r=mysql_fetch_array($sql)){
echo "<img src='".$r[src]."' title='".$r[title]."' />"
}
?>
выдает