Total members 11894 |It is currently Fri Nov 22, 2024 12:43 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





Code:
<html>
<head>
<title>Implode</title>
</head>
<body>
<?php
     $contact_data
= Array();
   
     
$contact_data[0][0] = "W";
     
$contact_data[0][1] = "W";
     
$contact_data[0][2] = "W";
     
$contact_data[0][3] = ".";
     
$contact_data[0][4] = "J";
     
$contact_data[0][5] = "A";
     
$contact_data[0][6] = "V";
     
$contact_data[0][7] = "A";
     
$contact_data[1][0] = 2;
     
$contact_data[1][1] = "S";
     
$contact_data[1][2] = ".";
     
$contact_data[1][3] = "C";
     
$contact_data[1][4] = "O";
     
$contact_data[1][5] = "M";
     
$contact_data[1][6] = 9;
     
$contact_data[1][7] = "";
     
$contact_data[2][0] = "A";
     
$contact_data[2][1] = "";
     
$contact_data[2][2] = "B";
     
$contact_data[2][3] = "C";
     
$contact_data[2][4] = "D";
     
$contact_data[2][5] = "E";
     
$contact_data[2][6] = 5;
     
$contact_data[2][7] = "5.555.5";
   
     
$str_export_data = "";
   
     for(
$i = 0; $i < count($contact_data); $i++)
          
$str_export_data .= implode(",", $contact_data[$i]) . "\n";
   
     print(
str_replace("\n", "\n<br />", $str_export_data));
?>
</body>
</html>




_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : Imploding an Array
 Array difference for associate array     -  
 compare an array with another array?     -  
 Shuffle Array     -  
 Here is how to display any 2d array     -  
 PHP Array Functions     -  
 Array shuffle     -  
 Array Passing     -  
 array unshift     -  
 Average of an array. Please help     -  
 Add elements to the end of an array     -  



Topic Tags

PHP Arrays






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com