<?php
$fruit = array("oranges","lemons","bananas");
$connection = mysql_connect("localhost","user","password");
mysql_select_db("bazarc", $connection);
$query = "INSERT INTO niz (id, clanovi_niza) VALUES ( NULL, '$fruit')";
mysql_query($query, $connection) or die(mysql_error());
$query = "SELECT * FROM niz ORDER BY id";
$result = mysql_query($query, $connection);
for ($i = 0; $i < mysql_num_rows($result); $i++)
{
$niz = mysql_result($result, $i, "clanovi_niza");
echo $niz;
}
?>
..i on mi ispishe samo: Array
Potrebne su mi vrednosti tog niza ponaosob! Kako doci do njih, i kako ih ispisati?