Example #1
0
 function echoArray(array $arr)
 {
     echo '[';
     foreach ($arr as $k => $v) {
         if (is_array($v)) {
             echo ',';
             echoArray($v);
         } else {
             if ($k > 0) {
                 echo ',';
             }
             echo $v;
         }
     }
     echo ']';
 }
Example #2
0
function echoArray($arreglo)
{
    $sizeofArray = count($arreglo);
    for ($i = 0; $i < $sizeofArray; $i++) {
        echo $arreglo[$i] . " ";
    }
}
if ($_POST['ordenar']) {
    $sizeofArray = $_POST['sizeSaved'];
    $arreglo = array();
    for ($i = 0; $i < $sizeofArray; $i++) {
        $arreglo[$i] = $_POST["position" . $i];
    }
    orderArray($arreglo);
    echo "<br><br>array order lest to greats<br>";
    echoArray($arreglo);
}
?>
<!DOCTYPE html>
<!--localhost/webApplication/ordenaArray.php-->
<html>
	<head>
		<title>Ordenamiento Ayan</title>
		<script type="text/javascript">
			var label;//label html
			function setAttribute(name,value){//set attribute in var label
				var attribute=document.createAttribute(name);//create attribute
				attribute.nodeValue=value;//set value of attribute
				return attribute;
			}
			function reloadInputs(){
Example #3
0
        $html = $caselisthtml;
        break;
    case 'casecontext':
        $casecontexthtml = requestData($fjudContextURL, $postdata, $fjudQueryURL, '', 'GET');
        //取得案件內容
        $html = $casecontexthtml;
        break;
    case 'caseprint':
        $caseprinthtml = requestData($fjudPrintURL, $printdata, $fjudContextURL, $getdata, 'GET');
        //取得友善列印
        $html = $caseprinthtml;
        break;
    case 'test':
        echo time();
        echo '<br>';
        echoArray(explode(',', $jrecno));
        break;
}
$contextpattern = '/(<pre[\\d\\D]*?>[\\d\\D]*?pre>)/';
preg_match($contextpattern, $html, $matches, PREG_OFFSET_CAPTURE);
$totalcountpattern = '/本次查詢結果共(\\d.*?)筆/';
preg_match($totalcountpattern, $html, $totalcountmatches, PREG_OFFSET_CAPTURE);
//if(count($totalcountmatches) > 0)
//echo 'TOTAL COUNT:'.$totalcountmatches[1][0];
if ($format == 'html') {
    echo $html;
} else {
    if ($format == 'plaintext') {
        $html = str_get_html($html);
        switch ($type) {
            case 'caselist':
 public function debug()
 {
     echoArray($this);
 }