Hello Everybody I want to making a Drop Down List Containing the main section and the Bottom of each main section subsections of this section as in this picture And I have tried making this method But did not work with me and This is the code Who wrote <select name='' id=''> <?php $get_sec = mysql_query("SELECT * FROM pic_cat"); while ($row = mysql_fetch_array($get_sec)) { if ($row['subcat'] == '0') { $catid = $row['cat_id']; echo "<option value='$row[cat_id]'>$row[cat_name]</option>"; if ($row['subcat'] = $catid) { echo "<option value='=$row[cat_id]'>$row[cat_name]</option>"; } } } // $row['cat_id'] = Main Section ID // $row['subcat'] = Sub Section ID // $row[cat_name] = Section Name ?> </select> PHP: I hope I have clarified the problem
Have you tried using inline CSS in the option tag? You may be able to literally just format the text with CSS but I'm not sure on that. Also a link may help if you have it