Question and answer is powered by AnsPress.io
You can try this code:
$sql=SELECT firstTable.name,firstTable.user_name, secondTable.company_name, secondTable.company_city FROM firstTable ,secondTable WHERE firstTable.id =secondTable.company_id;