So I want to try something a little different.
Let's say someone puts in an input text box the following two examples.
"name:Justin"
I want to go into an array
Index| Col Val
[0] Name Justin
In second Example "name:Justin,state:CA"
[0] Name Justin [1] State CA
Basically I have a page where Im using text inputs to query a remote database. I was thinking of doing some conditionals so that they can specify which column to search. Then pushing that to do multiple column searches but I need a way to read the results. I figured out how to do it for 1 result but I'm drawing a blank on how to do it if they want to do multiple.
Thoughts?
array_map(function($kv) {return explode(":",$kv);},explode(",",$input));
should get you started.