Jump to content

Returning two arrays from a function


rbrown

Recommended Posts

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,

 

Link to comment
https://forums.phpfreaks.com/topic/93550-returning-two-arrays-from-a-function/
Share on other sites

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...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.