How can I put this snippet of code in a function and then use the variables inside this function in another function ? (PHP) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How can I put this snippet of code in a function and then use the variables inside this function in another function ? (PHP)

I have a snippet of code a bit redundant I put in between commentaries in my code bellow. It's supposed to be less php possible So how can I put this snippet in a function and use for examples $error1 in this current function ? (MakeAnimalCrrationPage) Thanks! https://code.sololearn.com/w1rHdSBcWKwP/?ref=app

22nd Nov 2020, 2:52 PM
Adrien Linares
Adrien Linares - avatar
1 Answer
0
Is that solved? It is hard to understand what you want to do.
4th Dec 2020, 9:19 AM
Ipang