eduardo12fox
asked on
Doubt with angularJs with PHP
Hello guys,
I´m new in the world Angular and need make while in PHP but I´m receive error.
My php is:
An my html:
I want get 2 fild from php: nome and id and show in html. I not can use Object I need learning with php Structured
I´m new in the world Angular and need make while in PHP but I´m receive error.
My php is:
$Conn = mysql_connect("127.0.0.1", "root", "");
$Db = mysql_select_db("cdcol");
$sql = mysql_query("SELECT nome, Id FROM estudante ");
while ($row = mysql_fetch_assoc($sql)){
$data[]=$row["nome"];
}
print json_encode($data);
An my html:
<table>
<thead>
<tr>
<th>Name</th>
<th>Roll No</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="student in data track by $index">
<td>{{student.nome}}</td>
<td>{{student.id}}</td>
</tr>
</tbody>
</table>
I want get 2 fild from php: nome and id and show in html. I not can use Object I need learning with php Structured
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
You are welcome.
ASKER