Jump to content

Array Printouts


cuboidgraphix

Recommended Posts

Hi

 

Is there a way to only print out the values in an array, line by line?

 

I have this script:

 

<?php
$hlr = fopen("hlr.txt","r");
if(!$hlr) {
print "error! HLR file could not be opened";
exit;
}else{
$array1 = explode("/n", fread($hlr, filesize("hlr.txt")));
print_r($array1);
}
print "<br />";
$vlr = fopen("vlr.txt","r");
if(!$vlr) {
print "error! VLR file could not be opened";
exit;
}else{
$array2 = explode("/n", fread($vlr, filesize("vlr.txt")));
print_r($array2);
}
print "<br />";

$diff = array_diff($array1, $array2);
print_r($diff);
?>

 

But I get the output like ..:

 

Array ( [0] => 1 2 3 4 5 6 7 8 9 10 11 12 13 )

Array ( [0] => 4 5 6 )

Array ( [0] => 1 2 3 4 5 6 7 8 9 10 11 12 13 )

 

Is there a way to only get...

 

1

2

3

4

etc. 

 

???  Please help.

Link to comment
https://forums.phpfreaks.com/topic/102196-array-printouts/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.