Is it possible to insert entire arrays into single MySQL database fields? i.e. a 15 member array named $array ($array[0] through $array[14]) being stored in $row["array_1"] (the field in the database). Please let me know. Thanks!

-Campbell Krueger

    I usually store arrays like follow ...
    $member="Null".""."Mary".""."Alex"; //and so on...
    INSERT INTO db_name (array_1) VALUES ($member);
    then we have a field value like Null_Mary_Alex.... in table called db_name
    and we can read members from field like follow...
    $cc=split("_",$row["array_1"]);
    $j=0;
    while(empty($cc[$j])!=1)
    {
    echo ($j+1).$cc[j]."<br>";
    $j++;
    }
    will show...
    1.Null
    2.Mary
    3.Alex

    if somebody do this case more easily...
    that will be great...

      Write a Reply...