Answer the question
In order to leave comments, you need to log in
How to pass 2 values into an array but so that it is perceived as one in the array?
Example: you need to pull out 2 fields name and id from the base, and put them into the array as one! How to implement this?
Example:
id | name
1 | admin
in array:
admin1
Answer the question
In order to leave comments, you need to log in
Sorry, maybe I didn't understand the question. But just concatenate the values.
For example:
$arr[] = "$value1"."$value2";
This element will be listed as the last element of the array.
When fetching, use concatenation:SELECT CONCAT(name,id) AS slug FROM users
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question