I have an comma seperated list of values held as a string:
blue, left-right-middle, panther.png
I then have three functions:
-
Sets background colour
-
Sets order of columns for layout
-
Sets a profile image
At the moment I use a for each loop to explode the values into seperate strings, but how can I better control the results.
E.g
First result of array = Sets background colour
Second result of array = Sets order of columns
Third results of array = profile image
Can I write the results of the array to 3 seperate variables in anyway, so I can assign the variable to each function?
Like so:
First result of array = $backgroundColour
Second result of array = $orderColumns
Third results of array = $profileImage
Any ideas how I might go about this?
Use
list: