Saving data for 1 column of records in 1 time

gesf

Active member
Hey Leedahae,

I'm not sure about what you're trying to accomplish. How is your data generated and how is it stored... can you be more expecific !?
Anyways... i'll give you a simple example. In this one i assume that data is in array and the pipe is our field data delimiter:
Code:
<?php

$a = array("1|Ali|20", "2|Abu|35", "3|Aminah|67");
foreach($a as $value) {
     list($num, $name, $mark) = explode("|", $value);
     mysql_query("INSERT INTO table VALUES(" . $num . ", '" . $name . "', " . $mark . ");");
}

?>
Hope it helps!
 
Back
Top