Edit data from an array

Asked

Viewed 60 times

0

I have this array below:

    <?php

//Rio de Janeiro
$planoResidencialRjo = array(

array("nome" => "25MB Residencial", "cidade" => "Rio de Janeiro", "download" => "25MB", "upload" => "1MB", "tipo" => "Residencial", "valor" => "R$ 89,90", "fidelidade" => "R$ 69,90"),
array("nome" => "30MB Residencial", "cidade" => "Rio de Janeiro", "download" => "30MB", "upload" => "1MB", "tipo" => "Residencial","valor" => "R$ 99,90" , "fidelidade" => "R$ 79,90"),
array("nome" => "40MB Residencial", "cidade" => "Rio de Janeiro", "download" => "40MB", "upload" => "1MB", "tipo" => "Residencial", "valor" => "R$ 109,90", "fidelidade" => "R$ 89,90"),
array("nome" => "50MB Residencial", "cidade" => "Rio de Janeiro", "download" => "50MB", "upload" => "1MB", "tipo" => "Residencial", "valor" => "R$ 119,90", "fidelidade" => "R$ 99,90"),
);

$planoComercialRjo = array(

array("nome" => "40MB Residencial", "cidade" => "Rio de Janeiro", "download" => "40MB", "upload" => "upload de até 10% da velocidade de download", "tipo" => "Residencial", "valor" => "R$ 109,90", "fidelidade" => "R$ 89,90"),
array("nome" => "60MB Residencial", "cidade" => "Rio de Janeiro", "download" => "60MB", "upload" => "upload de até 10% da velocidade de download", "tipo" => "Residencial", "valor" => "R$ 119,90", "fidelidade" => "R$ 99,90"),
array("nome" => "100MB Residencial", "cidade" => "Rio de Janeiro", "download" => "100MB", "upload" => "upload de até 5% da velocidade de download", "tipo" => "Residencial", "valor" => "R$ 139,90", "fidelidade" => "R$ 119,90"),

);

I need to create another file PHP to allow me to modify these easily given in a simple form, which would be my first footsteps ?

  • Are you using database or not?

  • to nao amigo, is a neat array file recently created

  • Well then take the "easily"... rs the only way to do this without a database is to create an html form with the fields of each data you have in the array and this form the action of it being a php file q manipulate this data starts a ob_start() and turn this data into this code that is in your question getting the keys to their respective places in the array and then taking the contents of the buffer with ob_get_clean() and play in a php file with file_put_contents()... and doing it is kind of boring and gets kinda ugly also you know... kkk

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.