I have re written my question as i can not post a new one due to down votes....
as you can tell i was trying to display data in a table format and was wrongly advised to use some code which i was to fault i should have researched the code before using it.
but its a lesson that i have learnt:)
new question
i have taken the answers below to try to rectify the issue and now have a new question based on my origanal one
i am trying to make *clients_id* from the table repair_jobs appear as the name from the table contacts
but i am having no luck i have got 2 sql querices is this worng?
the 1st
$query = "select * from repair_jobs";
this helps me display he informaion i need and works
this is the 2nd
$query = "SELECT repair_jobs.client_id, contacts.name
FROM repair_jobs
INNER JOIN contacts
ON repair_jobs.client_id=contacts.name";
under that i have this to try to display the name of the client
echo "<td>{$client_id}</td>";
but it is only displaying the number and not the data i need