ok i worked it out.
<?php
$connection = mysql_connect("localhost","usernmae","password") or die('Could not connect to the database server');
$db = mysql_select_db("propertysql", $connection) or die ("Unable to select database.");
$sql = "select * from property";
$query = mysql_query($sql,$connection);
while ($row=mysql_fetch_assoc($query)) {
foreach ($row as $key=>$value) {
$key = str_replace("_", " ", $key);
$key = ucwords($key);
if ($value==1) { echo($key.'<br>'); }
}
}
?>
this script does everything pretty much what i want except i still need to order it alphabeticly.
now i want to format it into a table.
consisting of 5 columns buy however many rows (but i want to be able to specify the abount of colums)
currently it dumps it like this
Ensuit
Fly Screens
Laundry Facilities
Patio
Security Screens
Security System
i want it to (example 3 colums)
Ensuit | Laundry Facilities |Security Screens
Fly Screens | Patio |Security System
cheers aron.