The best way would be to return the data as a json Using rxjs subscribe you can fetch the data like this
users:any[]= [];
fetchData(){
this.http.get("users/all-users")
.subscribe((res)=>{
this.users = res.data
})
}
So in the html it would be something like
<select>
<option *ngFor="let user of users" value="user.id">
{{ user.name }}
</option>
</select>
So in your php return data like this
function getUsers(){
mysql_connect('hostname', 'username', 'password');
mysql_select_db('database-name');
$sql = "SELECT nameid FROM PC";
$result = mysql_query($sql);
return ["data"=>$result];
}
Advice though instead of using normal php use a framework like laravel/yii2 which makes returning data easily
NB:
Angular4 is a frontend framework so you cannot using echo like you would use it in a php framework.
Hope this helps.