rbrown Posted February 28, 2008 Share Posted February 28, 2008 I got it to return a single array by calling: Parse_Custom_Fields($input,&$first_array){... But I need it to return a second array but I can't get the first section right. I tried: Parse_Custom_Fields($input,&$first_array&$second_array){... Parse_Custom_Fields($input,&$first_array,&$second_array){... Parse_Custom_Fields($input,&$first_array,$second_array){... How do I do this? I don't want to add it to the first array if I don't have to. Thanks, Quote Link to comment Share on other sites More sharing options...
tinker Posted February 28, 2008 Share Posted February 28, 2008 Your way of using references should work but you can always fall back to: ... return array($a, $b); } list($a, $b) = myfunc(); I presume you've looked at this... http://uk2.php.net/manual/en/language.references.php Quote Link to comment Share on other sites More sharing options...
rbrown Posted February 28, 2008 Author Share Posted February 28, 2008 Doh! You are right... This worked... Parse_Custom_Fields($input,&$first_array,&$second_array){... I had a typo when I was calling the function... Wasn't paying attention to the error message.... Tired.... been programming since 1am. I think it's time for a nap. Thanks... Quote Link to comment Share on other sites More sharing options...
tinker Posted February 28, 2008 Share Posted February 28, 2008 I assuming your using different variable names in your real code because you've got that example up there. Either way, very good... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.