How to update this array?


Posted on 16th Feb 2014 07:03 pm by admin

I am saving a string that looks this: username1, username2, username3...
into a single cell in a database table.
I am doing this so that when I retrieve that string using normal methods, I can turn it into an array.

Did you know?Explore Trending and Topic pages for more stories like this.
However, my question is: I will need to update that cell and add user names to it. and then save it back to the database.
I don't have any example code as I haven't started because I am not sure where to start.

This is what I was thinking.

It will start out with one username "username1".
That is what the original value will be. I then need to pull that info out (easy) and populate an array

Code: $original = 'username1';
$userArray = array($original);
I then need to turn around and add 'username2' to $userArray. and add it to the DB so it is formatted as username1, username2, username3..
No comments posted yet

Your Answer:

Login to answer
253 Like 8 Dislike
Previous forums Next forums
Other forums

rand() function
just a general question guys a girls, is the rand() function 100% random or is it based on time?

Stumped by Third Day of Month problem
I am trying to build an algorithm that will essentially do this:
Code: [Select]$this_month = Oct

Grabbing Values From an Array for Posting
I have a grid array that I am using with a form that when it hits the currently named test.php it lo

email CODING Problem
Email coding problem.

I need to send a section of the info to $tf and the same as a Cc to $em

"From field" in PHP email form
I used a wizard to create a PHP email form. I was able to customize it with the exception of the Fr

Count
Getting the same count everytime

Code:
$visitquery = mysql_query("SELECT COUNT(*) FR

Function
How can I make this function that once you click the link in the code it takes you to a new page wit

login and redirect
hello! can someone help me.. can you give me an idea.. I want to make a login page and redirects it

Call db table from any PHP file
Hi,

I want to be able to call a database table that will be setup in another file called init

Display error above the login forum help!
Hi guys. just so you know im not asking for someone to do this for me I just need to be pointed in t

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash