print_r - 格式化SimpleXLSX数据?

Suppose I had a excel xlsx document called names with a couple of entries and wanted to print out the names from a php file.

include 'simplexlsx.class.php';

  $xlsx = new SimpleXLSX('names.xlsx');
  print_r( $xlsx->rows() );

This would print:

Array ( [0] => Array ( [0] => John [1] => Smith ) [1] => Array ( [0] => Steven [1] => Brake ) [2] => Array ( [0] => Carter [1] => Firen ) [3] => Array ( [0] => Juan [1] => Lahyno ) [4] => Array ( [0] => Sarah [1] => Parker ) [5] => Array ( [0] => Julie [1] => Roberts ) [6] => Array ( [0] => Will [1] => Smith ) [7] => Array ( [0] => Angelina [1] => Jolie ) )

Is there a way to print out the data in a readable way? Or does print_r not allow formatting of an array passed to it?

If you add

echo '<pre>';
print_r( $xlsx->rows() );

Then you see somethiink like this:

Array ( 
    [0] => Array 
        (
            [0] => John [1] => Smith 
        ) 
    [1] => Array 
        (   
            [0] => Steven [1] => Brake 
        )
...

I hope this will help you