How can I make jQuery get the PHP parameter from mysql_fetch_array()? Below is part of my code, any suggestion would be welcomed.
PHP
$query=mysql_query($sql) or die(mysql_error());
while($list=mysql_fetch_array($query)){
print"
<div id=\"#$list[id]\" class=\"f\">
jQuery
switch(id) {
case '#$list[id]':
(I’m trying to use Fancybox with this method https://stackoverflow.com/a/7844043/1575921)
why not use $.ajax() for this?
http://api.jquery.com/jQuery.ajax/
php:
It’s most likely you get something like this back from php:
with javascript you can split this with:
so your final code would be: