Jump to content

Pass array to function..


bundyxc

Recommended Posts

I want to have a function that creates an array, and I want to be able to pass that array out of the function, and onto the variable that the function has been assigned to.

 

$var = array_maker()
echo $var[1]; // This should echo the value of the first key of the array, inside of the function.

 

This seems completely simple, but I can't figure it out.

Thank you for your time, guys. :)

Link to comment
https://forums.phpfreaks.com/topic/168207-pass-array-to-function/
Share on other sites

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.