trekerboy Posted August 17, 2007 Share Posted August 17, 2007 Hello, The way I'd like to set up a particular set of functions is to have them either return TRUE or, for example: $errors[type] = "Sorry, the file type is not allowed. Allowed types are ".print_array_inline($acceptedTypes).". "; Then later, I have a foreach loop that echos each array element. However, when I echo each array element is doesn't output the whatever the print_array_inline function does. Any suggestions? Thanks for any help! - Jason Link to comment https://forums.phpfreaks.com/topic/65484-solved-how-to-add-function-result-to-array/ Share on other sites More sharing options...
sasa Posted August 17, 2007 Share Posted August 17, 2007 can we see print_array_inline() function? Link to comment https://forums.phpfreaks.com/topic/65484-solved-how-to-add-function-result-to-array/#findComment-327049 Share on other sites More sharing options...
trekerboy Posted August 17, 2007 Author Share Posted August 17, 2007 SOLVED. The problem was that my print_array_inline function did not return a value. So I used the .= to make a string via a few loops and assign that to a variable which is returned at the end of the function. Thanks anyway! - Jason Link to comment https://forums.phpfreaks.com/topic/65484-solved-how-to-add-function-result-to-array/#findComment-327097 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.