当前位置:Gxlcms > PHP教程 > php级联

php级联

时间:2021-07-01 10:21:17 帮助过:8人阅读

Demo

Fill second (or more) JSON AJAX Script, json.php

$json = array();  if ($_POST['type'] == 1) {     $json[] = array(         'value' => '1',         'text' => 'Staffordshire Bull Terrier'     );     $json[] = array(         'value' => '2',         'text' => 'Labrador Retriever/American Pit Bull Mix'     );     $json[] = array(         'value' => '3',         'text' => 'German Short Hair Pointer'     ); } elseif ($_POST['type'] == 2) {     $json[] = array(         'value' => '4',         'text' => 'Domestic Medium Hair'     ); }  echo json_encode($json);

人气教程排行