Hello Pals...
Help with this code...I am unable to hold Angularjs tag with Php variables

$vid = "{{task.vid}}"; //this where the Errors comes in :(
$s = $db->query("SELECT * FROM reply WHERE post_id_fk = '$vid'") or die($db->error.LINE);

Please how can i go about this? Thank you!

Recommended Answers

All 2 Replies

Hello Kindo,

Instead of assigning angularjs variable to php variable you can call direct in query string.

try this:
$s = $db->query("SELECT * FROM reply WHERE post_id_fk = '{{task.vid}}'") or die($db->error.LINE);

This should work with angularJS.

Thanks @ansaripk...this doesn't work either

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.