Jump to content

Need help to assign an array to a single value


Recommended Posts

hey everyone


will you please assist.


I'm getting data from a mysql database.


And I want to assign the data to a single value, if possible


For example, in my database I have 2 columns, name and group


Lets say John, Peter and Cathy belongs to group 555, where Sally and Marcus belongs to group 777.


So my sql query outputs all users in group 555


Is there a way to assign the search result to a vlue, for example $result = ???


and If I said echo $result, it should show the users who belongs to group 555 as an example.


I tried to use row[Name][1]; but it doesnt work.


The thing is, I can display the data the way I am familiar with, but I'm sending an automated email to myself, containing the users. So if I would used a for each statement, the mail will trigger and send a copy for every count, in this case, 3 times. And thats my huge problem.


The mail must trigger only once, containing the users in my search query, in this case, group 555.


Any help will be appreciated


Thank you

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.