problem ajax done call

problem ajax done call

Hi

I have this call:

  1. $.ajax({
  2.                    url: '../php/functions/area_id_to_table_name.php',
  3.                    type: 'post',
  4.                    async: false,
  5.                    dataType: 'json',
  6.                    data: {areaOfWorkId: userAreaOfWorkArray}
  7.                 }).done(function(object){
  8.                     alert(object);
  9.                 });
the code after this code is executed, and when I am bagging this in the browser I can see the it skips line number 9.

here is the php side code:

  1. <?php
  2. require_once 'connection.php';
  3. $link = conenct('localhost', 'root', '', 'w_db');

  4. mysql_query( "SET NAMES utf8" );
  5. mysql_query( "SET CHARACTER SET utf8" );
  6. mysql_set_charset('utf8', $link);

  7. Class AreaInfo{
  8.     public $areaNmae;
  9.     public $areaId;
  10.     public $areaTableName;
  11.     
  12.     public function getName(){
  13.         return $this->areaNmae;
  14.     }
  15.     public function setName($name){
  16.         $this->areaNmae = $name;
  17.     }

  18.     public function getId(){
  19.         return $this->areaId;
  20.     }
  21.     public function setId($id){
  22.         $this->areaId = $id;
  23.     }
  24.     
  25.      public function getTableName(){
  26.         return $this->areaTableName;
  27.     }
  28.     public function setTableName($tableName){
  29.         $this->areaTableName = $tableName;
  30.     }
  31. }

  32. $areaOfWorkArray = json_decode($_POST['userAreaOfWorkArray']);
  33. $areaInfoArray = Array();
  34. foreach ($areaOfWorkArray as $key){
  35.     $key = mysql_real_escape_string($key);
  36.     $tmpObj = new AreaInfo();
  37.     $tmpObj->setId($key);
  38.     $query = mysql_query("SELECT areaOfWork, tableName FROM area_of_work WHERE id = '$key'");
  39.     $query = mysql_fetch_assoc($query);
  40.     $tmpObj->setName($query['areaOfWork']);
  41.     $tmpObj->setTableName($query['tableName']);
  42.     array_push($areaInfoArray, $tmpObj);    
  43. }

  44. echo json_encode($areaInfoArray);
  45. ?>


Please HELP!!!