Jump to content

sasa

Staff Alumni
  • Posts

    2,804
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by sasa

  1. 1st
    [code]
    $therows[]=array(
    "<center>$dwntime_type</center>",
    "<center>$dwntime_date</center>",
    "<center>$dwntime_times</center>",
    "<center>$dwntime_hrs</center>",
    "<center>$dwntime_ata</center>",
    "<center>$dwntime_reason</center>",
    "<center>$dwntime_solution</center>",
    "<center>$dwntime_log</center>",
    "<center>$dwntime_log_by</center>");
    [/code]
    2nd
    [code]
    $x='';
    foreach ($therows as $therow){
    $x .= "<p>".implode('<br />',$therow)."</p>";
    $y .= $excel->writeLine($therows)"; // i don't know what object do
    }
    echo $x;
    [/code]
  2. tr[code]<?php
    $a=array(
    1 => array
      (
          2 => array
            (
                3 => array(
                    "3A" => array(
                      "3B" => array(
                          "X" => array()
                      ),
                      "3C" => array(
                          "X" => array()
                      )
                    )
                ),
                4 => array(
                    5 => array(
                      "X" => array()
                    ),
                    "5A" => array(
                      6 => array(
                          "X" => array()
                      )
                    )
                )
            ),
      )
    );

    function path($a,$b=array()){
    static $c;
    if (count($a)==0) $c[]= $b;
    foreach ($a as $key => $value){
    $b1=$b;
    $b1[]=$key;
    path($value,$b1);
    }
    return $c;
    }
    echo "<pre>";
    print_r (path($a));
    echo "</pre>";
    ?>[/code]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.