Thanks Yeti, it works.
Best, Andrej
Yeti wrote:
Correcting myself now ..
$myArray = array('b2005', 'b2008');
$sql = "SELECT study,symbol FROM test WHERE study IN ('$myArray[$i]')";
$result = mysql_query($sql);
if(mysql_num_rows($result) > 0) {
while ($myrow = mysql_fetch_array($result)) {
Dear all,
I have a MySQL table 'test' which includes two columns: 'study' and
'symbol':
study symbol
a2008 A
a2008 B
a2008 C
a2008 D
b2005 A
b2005 B
b2005 E
Using POST variable I passed 'study' values into $myArray:
// $myArray is variable length; used only two values in example
$myArray =
ow","red"),array("green","red","purple"),array("green","red","yellow"));
array_reduce($m_array, 'array_intersect');
but this could be wrong, havent done much with these 'meta' functions.
Regards,
Ti
Dear all,
I have to perform an intersection on array of arrays. The fact is that
php does not support intersection on multidimensional arrays.
So, the first simple example using only one dimensional arrays works well:
$array1 = array("green", "red", "blue");
$array2 = array("green", "yellow",
4 matches
Mail list logo