passing arrays from one function to an other

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
webcan
Forum Commoner
Posts: 66
Joined: Tue Oct 28, 2003 2:25 pm
Location: Toronto, Canada

passing arrays from one function to an other

Post by webcan »

On this topic ... how would I do this? :-)

In my PHP code, I am retrieving some info from a SQL DB which is put into the "row" array:

... $row = mysql_fetch_array($result) ...

So that $row["name"] contains some data. I would like to use this array in another function in the same PHP script, but I'm not sure how to globally declare the array.

A sample of the code would be awesome!

Thanks for your help!
Post Reply