Skip to content
Advertisement

Return Array values from PHP Function

I’m trying to get the users from PHP form. PHP Function has to create new users (username, first name & email) with registeruser($user),that is to insert to database.

I was able to insert only one row to database. Could you guide me to insert more than one user and return all the users.

The new users come from $array['newuser'].

JavaScript

Advertisement

Answer

i think you are searching for this answer;here whenever new user comes it will store to an array $userreg[] =registeruser($user); and return that array after the loop

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement