Problem with function in array (PHP)

1 replies
Hello Friends

I Have a Problem in my Function. I have created a Recursion Function in PHP and also Created an Array.
I am having trouble in storing this Recursion Function Value in Array.
Can anyone help me with this.


Thanks
#array #function #php #problem
  • Profile picture of the author Luke Graham
    If you are storing the value in an array inside the recursion function you will need be able to access it on the next iteration as it is a new call to the function. You will either need to pass the array in as an argument or look at doing it through object interaction.

    (You could also use global variables but there are many reasons why that is bad practice which i wont go into here).

    If you are still having problems, can you give an example of what you are doing, and what the problem is.
    Signature
    Best Ways To Make Money Online

    Eight bytes walk into a bar. The bartender asks, “Can I get you anything?”
    “Yeah,” reply the bytes. “Make us a double.”
    {{ DiscussionBoard.errors[1928550].message }}

Trending Topics