The following piece of code is now causing this error: $recipe_item = '<select name="recipe_item">'; for( $i = 0; $i < count($item_list); $i++ ) { $recipe_item[$i]['item_name'] = adr_get_lang($item_list[$i]['item_name']); $recipe_item .= '<option value = "'.$item_list[$i]['item_id'].'" >' . $item_list[$i]['item_name'] . '</option>'; } $recipe_item .= '</select>'; PHP: Now, I've read that PHP5 doesn't always handle this code the same way as PHP4, and that it's the $recipe_item[$i] bit that's causing problems, but I don't know how to fix it. Especially if there's a way to alter it so that it still works with PHP4.
$recipe_item[$i]['item_name'] Code (markup): Prior to that you're treating $recipe_item as a string. The error comes up because the above sniplet is trying to reference an index of an index. If $recipe_item[$i] was an array, then $recipe_item[$i]['item_name'] could exist. However, since $recipe_item is a string, $recipe_item[$i] is a single character, not an array.
The code is used to create a drop-down list. It works fine in PHP4, but some people have had problems with it in PHP5.
Try change loop to this: for( $i = 0; $i < count($item_list); $i++ ) { $recipe_item .= '<option value = "'.$item_list[$i]['item_id'].'" >' . adr_get_lang($item_list[$i]['item_name']) . '</option>'; } PHP: