PHP Echo Ampersand Ajax Anchor Tag Issues
Posted: Fri Apr 25, 2008 2:12 am
Hello,
I have an XSL file and I am firing an Ajax call from a link that would do a GET request to the PHP script and it would return a string that basically holds a snippet of HTML and as I get back the response, the Ajax callback would manipulate an exisiting section of the HTML with the response just received.
Its working fine except that I am printing anchor tags which is a GET request to some script. The problem is that the "Ampersand" is not correctly passed on to the XHTML page.
Snippets are below:
Script that creates the string and echoes on the server side:Snippet:
$print .= "<td>";
$print .= "<a href='" . "main.php?page=config_detail" . "&" . "app=" . $_GET['app'] . "&" . "config=" . $config_id_ex[$x]. "'>" .$config_name_ex[$x]. "</a>";
$print .= "</td>";
Link that is actually present on the XHTML file after the AJAX is executed is:
http://localhost/main.php?page=config_d ... onfig=1000
But I want it to be "&".
Please help,
I have an XSL file and I am firing an Ajax call from a link that would do a GET request to the PHP script and it would return a string that basically holds a snippet of HTML and as I get back the response, the Ajax callback would manipulate an exisiting section of the HTML with the response just received.
Its working fine except that I am printing anchor tags which is a GET request to some script. The problem is that the "Ampersand" is not correctly passed on to the XHTML page.
Snippets are below:
Script that creates the string and echoes on the server side:Snippet:
$print .= "<td>";
$print .= "<a href='" . "main.php?page=config_detail" . "&" . "app=" . $_GET['app'] . "&" . "config=" . $config_id_ex[$x]. "'>" .$config_name_ex[$x]. "</a>";
$print .= "</td>";
Link that is actually present on the XHTML file after the AJAX is executed is:
http://localhost/main.php?page=config_d ... onfig=1000
But I want it to be "&".
Please help,