what should i do with this code in php?

samuel101

New member
im having trouble with this, here's some part of code which i have error:

<?php

$hob= array("major" => array(1=> "Life", 2=>"Love",3=>"Family"));

echo 'Hob : ';
echo '<select name=hob>';
echo '<option>';
echo $hob["major"][1];
echo '</option>';
echo '<option>';
echo $hob["major"][2];
echo '</option>';
echo '<option>';
echo $hob["major"][3];
echo '</option>';
echo '</select>';

?>

upon sending:

$result = mysql_query ("SELECT * FROM `tbl_upload` WHERE (`year` >= $sy[0] AND `year` <= $sy[1]) AND `course` = $hob['major'][] ");

i know my problem is with this ---------- AND `course` = $hob['major'][] ")

what should i do?

thanks-samuel
what does [PUT_STH_HERE] means?
did that but still have the error:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING
 
Back
Top