Compose PHP Array and write results to file

Ukończone Opublikowano Feb 22, 2014 Płatność przy odbiorze
Ukończone Płatność przy odbiorze

Complete an already started PHP array query I made, and write the results to a file.

Example:

$result = mysql_query("SELECT domain, email FROM database");

$data = array();

while ($row = mysql_fetch_array($result)) {

array_push($data, $row["domain"], $row["email"]);

}

foreach($data as $value) {

echo $value;

echo ";";

}

mysql_close($con);

$header = "domain;email;command;url";

$file = fopen("[url removed, login to view]","w");

echo fwrite($file,"$header");

fclose($file);

The job is a minutes job, and all I need is just to write the results to a file CSV in the following order:

domain;email;command;url

[url removed, login to view];email;[url removed, login to view];[url removed, login to view]

[url removed, login to view];email;[url removed, login to view];[url removed, login to view]

Its basically just building up the PHP array to have the results in the correct order to write to the file.

More info on accepted project. I need this as "now" as it should not take more than a couple of minutes since I made most of the code already in one file, its just not ordering results in the correct order.

MySQL PHP

Numer ID Projektu: #5474049

O projekcie

10 ofert Zdalny projekt Aktywny Feb 22, 2014

Przyznany użytkownikowi:

cristyrandi

Hi Weiterer, i can help you with your issue right now. Let me know if i can be of assistance. Thanks.

$15 USD w 1 dzień
(0 ocen)
0.0

10 freelancerów złożyło ofertę za $20 w tym projekcie

urmate

************** Will do it right away ****************** (I only need table schema and few dummy records will finish within an hour or so). HI Contact me for an efficient, well documented and perfect solution Więcej

$30 USD w ciągu 0 dni
(80 Oceny)
5.8
eried

A proposal has not yet been provided

$25 USD w ciągu 1 dnia
(37 Oceny)
4.7
Grupo83

Hi, I have 10+ years of PHP/MySQL programming experience. I would be pleased to help you with your script. Please contact me if interested. Thanks

$25 USD w ciągu 1 dnia
(22 Oceny)
4.4
hcevan

Hello, I have been working in the web development and web design industry for over 12 years and can easily help you with this project. What type of sorting are you after? Also, what version of PHP are you usin Więcej

$15 USD w ciągu 0 dni
(22 Oceny)
3.8
davidejones

I can do this work today for you and am pretty confident it won't take long at all. I've worked in PHP for many years.

$30 USD w ciągu 1 dnia
(1 Ocena)
3.0
jpadula

Hi! i can do it NOW! you will not regret! if you are interested, please contact me! Thanks you very much! Greetings!

$19 USD w ciągu 0 dni
(2 Oceny)
1.0
vanekjar

Hi, I can make the script for you in next few minutes. Feel free to contact me with more details. Regards, J.V.

$10 USD w ciągu 0 dni
(1 Ocena)
0.8
herinurmanto

Proposal belum diberikan

$10 USD w ciągu 0 dni
(0 Oceny)
0.0