Jump to content

[SOLVED] foreach Array ( [0] => --- clean up


johnwayne77

Recommended Posts

this is my code

 

<?
include("functions.php");

$filename='fields.txt';
  $handle = fopen($filename,'r');
  while (($data = fgetcsv($handle)) !== FALSE)
  {
    $show = function1($data[0],$data[1]);
print_r($show); 
  }
  @fclose($handle);

?>

 

fields.txt contains on each line following info:

 

fielda1, fieldb1

fielda2, fieldb2

......

 

the myfunction take fielda1, fieldb1 checks it with a database and returns the result linked to those.

 

 

the problem is i get the result in the following appeareance:

 

[4] => Array ( [0] => fielda4 [1] => fieldb4 )

 

i need to have printed only fieldb4 result (without [0][1][4]ARRAY)..

 

 

 

 

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.