Advertisement
jumpy83

array mysql

Mar 7th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. <?php
  2. //connessione a mysql
  3. $link=mysqli_connect("localhost","root","password","my_database");
  4. //l'array da salvare
  5. $arr_val=array("Anno"=>"1980","Mese"=>"Febbraio","Giorno"=>"22","Ora"=>"13");
  6. $serialize = serialize($arr_val);
  7.  
  8. //e quindi la query di storage
  9. mysqli_query($link,"INSERT into table_name (campo) VALUES ('$serialize')");
  10. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement