Danke aber ich hab noch ein Problem und zwar hab ich hier wieder Code:
Code:
if ($contentinfo['content_rate_layout']=='1') $rate1_1=' selected';
elseif ($contentinfo['content_rate_layout']=='2') $rate1_2=' selected';
elseif ($contentinfo['content_rate_layout']=='3') $rate1_3=' selected';
elseif ($contentinfo['content_rate_layout']=='4') $rate1_4=' selected';
elseif ($contentinfo['content_rate_layout']=='5') $rate1_5=' selected';
elseif ($contentinfo['content_rate_layout']=='6') $rate1_6=' selected';
elseif ($contentinfo['content_rate_layout']=='7') $rate1_7=' selected';
elseif ($contentinfo['content_rate_layout']=='8') $rate1_8=' selected';
elseif ($contentinfo['content_rate_layout']=='9') $rate1_9=' selected';
elseif ($contentinfo['content_rate_layout']=='10') $rate1_10=' selected';
if ($contentinfo['content_rate_design']=='1') $rate2_1=' selected';
elseif ($contentinfo['content_rate_design']=='2') $rate2_2=' selected';
elseif ($contentinfo['content_rate_design']=='3') $rate2_3=' selected';
elseif ($contentinfo['content_rate_design']=='4') $rate2_4=' selected';
elseif ($contentinfo['content_rate_design']=='5') $rate2_5=' selected';
elseif ($contentinfo['content_rate_design']=='6') $rate2_6=' selected';
elseif ($contentinfo['content_rate_design']=='7') $rate2_7=' selected';
elseif ($contentinfo['content_rate_design']=='8') $rate2_8=' selected';
elseif ($contentinfo['content_rate_design']=='9') $rate2_9=' selected';
elseif ($contentinfo['content_rate_design']=='10') $rate2_10=' selected';
if ($contentinfo['content_rate_gameplay']=='1') $rate3_1=' selected';
elseif ($contentinfo['content_rate_gameplay']=='2') $rate3_2=' selected';
elseif ($contentinfo['content_rate_gameplay']=='3') $rate3_3=' selected';
elseif ($contentinfo['content_rate_gameplay']=='4') $rate3_4=' selected';
elseif ($contentinfo['content_rate_gameplay']=='5') $rate3_5=' selected';
elseif ($contentinfo['content_rate_gameplay']=='6') $rate3_6=' selected';
elseif ($contentinfo['content_rate_gameplay']=='7') $rate3_7=' selected';
elseif ($contentinfo['content_rate_gameplay']=='8') $rate3_8=' selected';
elseif ($contentinfo['content_rate_gameplay']=='9') $rate3_9=' selected';
elseif ($contentinfo['content_rate_gameplay']=='10') $rate3_10=' selected';
Insgesamt hab ich 7 solche Blöcke, die sich eigentlich recht ähnlich sind. Kann mir jemand sagen wie ich das am besten in eine Funktion packe? Ich schaffs irgendwie nicht recht.