Skip to main content

Help: make a generic function

1 reply [Last post]
cpu2007
Offline
Joined: 2012-10-24

Hi everyone,

I was wondering if is possible to make functions that can take generic type and return it back after being processed.

For example:

I have a function and I would like this function to either take a string or an array
Depending on type a switch case will be activated accordingly but once processed I want to return that array or string back.

Is it possible to do so?

Thank you

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
cpu2007
Offline
Joined: 2012-10-24

Any help would be appreciated :)