loadHTML($output); $xpath = new DOMXPath($dom); $ad = $xpath->query('//*[@id="txtAdi"]')->item(0)->getAttribute('value'); $soyad = $xpath->query('//*[@id="txtSoyadi"]')->item(0)->getAttribute('value'); $no = $xpath->query('//*[@id="txtOgrOkulNo"]')->item(0)->getAttribute('value'); return array( 'ad' => $ad, 'soyad' => $soyad, 'okulno' => $no, // 'durum' => $durum ); } $ad = getInfo($cookie,$tc)['ad']; $soyad = getInfo($cookie,$tc)['soyad']; $okulno = getInfo($cookie,$tc)['okulno']; // $durum = getInfo($cookie,$tc)['durum']; $array1['tc'] = $tc; $array2['ad'] = $ad; $array3['soyad'] = $soyad; $array4['okulno'] = $okulno; $dizi = array($array1, $array2, $array3, $array4); echo json_encode($dizi);