Hello,
I'm trying to get a var from php into my jquery code, but I'm having no luck.
Jquery:
$.ajax({
type : "POST",
url : "sortProp.php",
data : "f="+type+"&s="+filter,
success : function(data){
$('#propHold').html(data);
$('#propHold .prop:first').addClass('active');
alert(data.title);
}
});
Php:
$title = array("title" => "$propName");
json_encode($title);
I can't seem to get the json_encoded var to come up in my .ajax alert. Any help on doing this would be great!
Thanks
-BaSk